You are here

function _ds_fields_run_preprocess in Display Suite 6.3

Same name and namespace in other branches
  1. 6 includes/ds.fields.inc \_ds_fields_run_preprocess()
  2. 6.2 includes/ds.fields.inc \_ds_fields_run_preprocess()

Helper function to run through the preprocess functions.

1 call to _ds_fields_run_preprocess()
nd_fields_examples.inc in modules/nd/nd_fields_examples.inc
Loads a node object to show the rendered object and the variables.

File

includes/ds.fields.inc, line 803
Manage fields.

Code

function _ds_fields_run_preprocess(&$variables, $hook) {
  $hooks = theme_get_registry();
  $info = $hooks[$hook];
  if (isset($info['preprocess functions']) && is_array($info['preprocess functions'])) {

    // This construct ensures that we can keep a reference through
    // call_user_func_array.
    $args = array(
      &$variables,
      $hook,
    );
    foreach ($info['preprocess functions'] as $preprocess_function) {
      if (function_exists($preprocess_function)) {
        call_user_func_array($preprocess_function, $args);
      }
    }
  }
}