diff --git a/includes/common.inc b/includes/common.inc index d34c19d..ccb4876 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6138,6 +6138,14 @@ function element_child($key) { /** * Return the children of an element, optionally sorted by weight. * + * By convention, the 'children' of an array are those elements that do not + * have a key starting with '#'. This allows a single array to represent a + * tree structure where nodes in the tree have properties: The properties of + * a node are key/value pairs where the key starts with a '#'. The children + * are those key/value pairs where the key does not. See drupal_render() for + * an example how the distinction may be used. element_children() helps + * extracting only the children-representing key/value pairs of a given array. + * * @param $elements * The element to be sorted. * @param $sort