function panels_ctools_plugin_directory in Panels 7.3
Same name and namespace in other branches
- 6.3 panels.module \panels_ctools_plugin_directory()
- 6.2 panels.module \panels_ctools_plugin_directory()
Implements hook_ctools_plugin_directory().
File
- ./
panels.module, line 406 - Core functionality for the Panels engine.
Code
function panels_ctools_plugin_directory($module, $plugin) {
// To let the system know we implement task and task_handler plugins.
// Safety: go away if CTools is not at an appropriate version.
if (!module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API)) {
return;
}
// We don't support the 'ctools' 'cache' plugin and pretending to causes
// errors when they're in use.
if ($module == 'ctools' && $plugin == 'cache') {
// If we did we'd make a plugin/ctools_cache or something.
return;
}
if ($module == 'page_manager' || $module == 'panels' || $module == 'ctools' || $module == 'stylizer') {
// Panels and CTools both implement a 'cache' plugin but we don't implement
// the CTools version.
if ($module == 'ctools' && $plugin == 'cache') {
return;
}
return 'plugins/' . $plugin;
}
}