function drupal_pre_render_markup

#pre_render callback to append contents in #markup to #children.

This needs to be a #pre_render callback, because eventually assigned #theme_wrappers will expect the element's rendered content in #children. Note that if also a #theme is defined for the element, then the result of the theme callback will override #children.

Parameters

$elements: A structured array using the #markup key.

Return value

The passed-in elements, but #markup appended to #children.

See also

drupal_render()

1 string reference to 'drupal_pre_render_markup'
system_element_info in modules/system/system.module
Implements hook_element_info().

File

includes/common.inc, line 6003

Code

function drupal_pre_render_markup($elements) {
    $elements['#children'] = $elements['#markup'];
    return $elements;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.