You are here

function panels_load_hooks in Panels 6.2

Same name and namespace in other branches
  1. 5.2 includes/ \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.


$hook: The hook being invoked.

Return value

An array of info supplied by any hook implementations.

See also


1 call to panels_load_hooks()
panels_get_plugins in includes/
Fetch a group of plugins by name.


includes/, line 1468


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;