function hide

cis7 common.inc hide(&$element)
cle7 common.inc hide(&$element)
elmsmedia7 common.inc hide(&$element)
icor7 common.inc hide(&$element)
meedjum_blog7 common.inc hide(&$element)
mooc7 common.inc hide(&$element)

Hides an element from later rendering.

The first time render() or drupal_render() is called on an element tree, as each element in the tree is rendered, it is marked with a #printed flag and the rendered children of the element are cached. Subsequent calls to render() or drupal_render() will not traverse the child tree of this element again: they will just use the cached children. So if you want to hide an element, be sure to call hide() on the element before its parent tree is rendered for the first time, as it will have no effect on subsequent renderings of the parent tree.

Parameters

$element: The element to be hidden.

Return value

The element.

See also

render()

show()

33 calls to hide()
comment.tpl.php in themes/garland/comment.tpl.php
comment.tpl.php in modules/comment/comment.tpl.php
Default theme implementation for comments.
comment.tpl.php in themes/bartik/templates/comment.tpl.php
Bartik's theme implementation for comments.
comment.tpl.php in sites/all/themes/local_contrib/bootstrap/templates/comment.tpl.php
comment.tpl.php in sites/all/themes/ulmus/skeletontheme/templates/comment.tpl.php
Bartik's theme implementation for comments.

... See full list

17 string references to 'hide'
advanced_help_index_page in sites/all/modules/ulmus/advanced_help/advanced_help.module
Page callback to view the advanced help topic index.
ctools_dependent_pre_render in sites/all/modules/ulmus/ctools/includes/dependent.inc
ctools_jump_menu in sites/all/modules/ulmus/ctools/includes/jump-menu.inc
Generate a jump menu form.
date_repeat_field_date_field_formatter_settings_form_alter in sites/all/modules/ulmus/date/date_repeat_field/date_repeat_field.module
Implements hook_date_field_foramatter_settings_form_alter().
EntityReferencePrepopulateInstanceBehavior::settingsForm in sites/all/modules/ulmus/entityreference_prepopulate/plugins/behavior/EntityReferencePrepopulateInstanceBehavior.class.php
Generate a settings form for this handler.

... See full list

File

includes/common.inc, line 6021
Common functions that many Drupal modules will need to reference.

Code

function hide(&$element) {
  $element['#printed'] = TRUE;
  return $element;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.