function drupal_render_children

7.x drupal_render_children(&$element, $children_keys = NULL)

Renders children of an element and concatenates them.

This renders all children of an element using drupal_render() and then joins them together into a single string.


$element: The structured array whose children shall be rendered.

$children_keys: If the keys of the element's children are already known, they can be passed in to save another run of element_children().

31 calls to drupal_render_children()
template_preprocess_block_admin_display_form in drupal/modules/block/
Processes variables for block-admin-display-form.tpl.php.
template_preprocess_poll_vote in drupal/modules/poll/poll.module
Themes the voting form for a poll.
theme_aggregator_categorize_items in drupal/modules/aggregator/
Returns HTML for the aggregator page list form for assigning categories.
theme_color_scheme_form in drupal/modules/color/color.module
Returns HTML for a theme's color form.
theme_confirm_form in drupal/modules/system/system.module
Returns HTML for a confirmation form.

... See full list


drupal/includes/, line 5930
Common functions that many Drupal modules will need to reference.


function drupal_render_children(&$element, $children_keys = NULL) {
  if ($children_keys === NULL) {
    $children_keys = element_children($element);
  $output = '';
  foreach ($children_keys as $key) {
    if (!empty($element[$key])) {
      $output .= drupal_render($element[$key]);
  return $output;