function template_process

cis7 theme.inc template_process(&$variables, $hook)
cle7 theme.inc template_process(&$variables, $hook)
elmsmedia7 theme.inc template_process(&$variables, $hook)
icor7 theme.inc template_process(&$variables, $hook)
meedjum_blog7 theme.inc template_process(&$variables, $hook)
mooc7 theme.inc template_process(&$variables, $hook)

Adds helper variables derived from variables defined during preprocessing.

When preparing variables for a theme hook implementation, all 'preprocess' functions run first, then all 'process' functions (see theme() for details about the full sequence).

This function serializes array variables manipulated during the preprocessing phase into strings for convenient use by templates. As with template_preprocess(), this function does not get called for theme hooks implemented as functions.

See also

theme()

template_preprocess()

2 string references to 'template_process'
alpha_theme in sites/all/themes/ulmus/omega/alpha/template.php
Implements hook_theme().
rubik_theme in sites/all/themes/ulmus/rubik/template.php
Implementation of hook_theme().

File

includes/theme.inc, line 2433
The theme system, which controls the output of Drupal.

Code

function template_process(&$variables, $hook) {
  // Flatten out classes.
  $variables['classes'] = implode(' ', $variables['classes_array']);

  // Flatten out attributes, title_attributes, and content_attributes.
  // Because this function can be called very often, and often with empty
  // attributes, optimize performance by only calling drupal_attributes() if
  // necessary.
  $variables['attributes'] = $variables['attributes_array'] ? drupal_attributes($variables['attributes_array']) : '';
  $variables['title_attributes'] = $variables['title_attributes_array'] ? drupal_attributes($variables['title_attributes_array']) : '';
  $variables['content_attributes'] = $variables['content_attributes_array'] ? drupal_attributes($variables['content_attributes_array']) : '';
}
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.