function _author_pane_build_preprocess in Author Pane 5
Helper function that does the leg work of finding preprocessor functions for a given hook.
Parameters
$hook: A theme hook that need preprocessing.
Return value
An array of preprocessor functions.
1 call to _author_pane_build_preprocess()
- author_pane_get_preprocess in ./
d6_compat.inc - Get a list of preprocess functions for a given hook.
File
- ./
d6_compat.inc, line 72
Code
function _author_pane_build_preprocess($hook) {
$return = array();
// Default preprocessor prefix.
$prefixes['template'] = 'template';
// Add all modules so they can intervene with their own preprocessors. This allows them
// to provide preprocess functions even if they are not the owner of the current hook.
$prefixes += module_list();
// Some modules in d5 already have functions that look like preprocess hooks.
unset($prefixes['search']);
foreach ($prefixes as $prefix) {
if (function_exists($prefix . '_preprocess')) {
$return[] = $prefix . '_preprocess';
}
if (function_exists($prefix . '_preprocess_' . $hook)) {
$return[] = $prefix . '_preprocess_' . $hook;
}
}
return $return;
}