function render

7.x common.inc render(&$element)

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.

Parameters

$element: The element to be rendered.

Return value

The rendered element.

See also

drupal_render()

show()

hide()

23 calls to render()
block.tpl.php in drupal-7.x/modules/block/block.tpl.php
Default theme implementation to display a block.
book-all-books-block.tpl.php in drupal-7.x/modules/book/book-all-books-block.tpl.php
Default theme implementation for rendering book outlines within a block.
comment-wrapper.tpl.php in drupal-7.x/modules/comment/comment-wrapper.tpl.php
Default theme implementation to provide an HTML container for comments.
comment-wrapper.tpl.php in drupal-7.x/themes/bartik/templates/comment-wrapper.tpl.php
Bartik's theme implementation to provide an HTML container for comments.
comment.tpl.php in drupal-7.x/modules/comment/comment.tpl.php
Default theme implementation for comments.

... See full list

4 string references to 'render'
hook_batch_alter in drupal-7.x/modules/system/system.api.php
Alter batch information before a batch is processed.
overlay_batch_alter in drupal-7.x/modules/overlay/overlay.module
Implements hook_batch_alter().
overlay_drupal_goto_alter in drupal-7.x/modules/overlay/overlay.module
Implements hook_drupal_goto_alter().
overlay_init in drupal-7.x/modules/overlay/overlay.module
Implements hook_init().

File

drupal-7.x/includes/common.inc, line 5990
Common functions that many Drupal modules will need to reference.

Code

function render(&$element) {
  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;
  }
}