Renders an element.
This function renders an element using drupal_render(). The top level element is shown with show() before rendering, so it will always be rendered even if hide() had been previously used on it.
$element: The element to be rendered.
The rendered element.
show()
hide()
function render(&$element) {
if (!$element && $element !== 0) {
return NULL;
}
if (is_array($element)) {
show($element);
return drupal_render($element);
}
else {
// Safe-guard for inappropriate use of render() on flat variables: return
// the variable as-is.
return $element;
}
}