drupal_pre_render_markup
function drupal_pre_render_markup
drupal_pre_render_markup($elements)
#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
File
- includes/common.inc, line 5846
- Common functions that many Drupal modules will need to reference.
Code
function drupal_pre_render_markup($elements) { $elements['#children'] = $elements['#markup']; return $elements; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_pre_render_markup/7.x