| 7 theme.inc | template_process(&$variables, $hook) |
| 8 theme.inc | template_process(&$variables, $hook) |
A default process function used to alter variables as late as possible.
For more detailed information, see theme().
File
- core/
includes/ theme.inc, line 2458 - 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']) : '';
}
Login or register to post comments