function hook_process

Process theme variables for templates.

This hook allows modules to process theme variables for theme templates. It is called for all theme hooks implemented as templates, but not for theme hooks implemented as functions. hook_process_HOOK() can be used to process variables for a specific theme hook, whether implemented as a template or function.

For more detailed information, see theme().

Parameters

$variables: The variables array (modify in place).

$hook: The name of the theme hook.

10 functions implement hook_process()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

batch_process in drupal/core/includes/form.inc
Processes the batch.
datetime_datelist_form_process in drupal/core/modules/datetime/datetime.module
Expands a date element into an array of individual elements.
datetime_datetime_form_process in drupal/core/modules/datetime/datetime.module
Expands a #datetime element type into date and/or time elements.
file_field_widget_process in drupal/core/modules/file/file.field.inc
Render API callback: Processes a file_generic field element.
file_managed_file_process in drupal/core/modules/file/file.module
Render API callback: Expands the managed_file element type.

... See full list

File

drupal/core/modules/system/theme.api.php, line 176

Code

function hook_process(&$variables, $hook) {

  // Wraps variables in RDF wrappers.
  if (!empty($variables['rdf_template_variable_attributes'])) {
    foreach ($variables['rdf_template_variable_attributes'] as $variable_name => $attributes) {
      $context = array(
        'hook' => $hook,
        'variable_name' => $variable_name,
        'variables' => $variables,
      );
      $variables[$variable_name] = theme('rdf_template_variable_wrapper', array(
        'content' => $variables[$variable_name],
        'attributes' => $attributes,
        'context' => $context,
      ));
    }
  }
}