You are here

function ctools_plugin_load_hooks in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/plugins.inc \ctools_plugin_load_hooks()

Load plugin info for the provided hook; this is handled separately from plugins from files.

Parameters

$info: The info array about the plugin as created by ctools_plugin_get_info()

Return value

An array of info supplied by any hook implementations.

1 call to ctools_plugin_load_hooks()
ctools_get_plugins in includes/plugins.inc
Fetch a group of plugins by name.

File

includes/plugins.inc, line 520
Contains routines to organize and load plugins. It allows a special variation of the hook system so that plugins can be kept in separate .inc files, and can be either loaded all at once or loaded only when necessary.

Code

function ctools_plugin_load_hooks($info) {
  $hooks = array();
  foreach (module_implements($info['hook']) as $module) {
    $result = ctools_plugin_process($info, $module, $module, drupal_get_path('module', $module));
    if (is_array($result)) {
      $hooks = array_merge($hooks, $result);
    }
  }
  return $hooks;
}