function panels_load_hooks in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/plugins.inc \panels_load_hooks()
Load plugin info for the provided hook; this is handled separately from plugins from files.
IMPORTANT: The hooks invoked by this function do work, but it is _not_ the preferred method, as it is left up to the module invoking the hook to handle including separate .inc files with potentially unneeded functions - and there is no way for any entity external to the Panels engine to know if that inclusion is necessary. Consequently, hook_panels_include_directory() should be used unless some aspect of the client's implementation is incompatible with that approach.
Parameters
$hook: The hook being invoked.
Return value
An array of info supplied by any hook implementations.
See also
panels_get_include_directories()
1 call to panels_load_hooks()
- panels_get_plugins in includes/
plugins.inc - Fetch a group of plugins by name.
File
- includes/
plugins.inc, line 1451 - plugins.inc
Code
function panels_load_hooks($hook) {
$info = array();
foreach (module_implements($hook) as $module) {
$result = _panels_process_plugin($module, $module, drupal_get_path('module', $module), $hook);
if (is_array($result)) {
$info = array_merge($info, $result);
}
}
return $info;
}