summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-22 08:18:56 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-22 08:18:56 +0000
commit98df60e726f0bd5ea0a3ff6a7a52daa0da169b5e (patch)
tree85c070964427bb38c79173912af89dc83355ae54
parent3d0262fdd9e1377fe9249e5f43b9cc9c129e0e94 (diff)
downloadbrdo-98df60e726f0bd5ea0a3ff6a7a52daa0da169b5e.tar.gz
brdo-98df60e726f0bd5ea0a3ff6a7a52daa0da169b5e.tar.bz2
#357799 by unexpand and Heine: Clarify return value of drupal_render() function.
-rw-r--r--includes/common.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 312246d77..d039702ba 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -4910,6 +4910,13 @@ function drupal_render_page($page) {
* using uasort(). Since this is expensive, when passing already sorted
* elements to drupal_render(), for example from a database query, set
* $elements['#sorted'] = TRUE to avoid sorting them a second time.
+ *
+ * drupal_render() flags each element with a '#printed' status to indicate that
+ * the element has been rendered, which allows individual elements of a given
+ * array to be rendered independently and prevents them from being rendered
+ * more than once on subsequent calls to drupal_render() (e.g., as part of a
+ * larger array). If the same array or array element is passed more than once
+ * to drupal_render(), it simply returns a NULL value.
*
* @param $elements
* The structured array describing the data to be rendered.