? 711664_deprecate_global_definiton_hook_followup.patch Index: API.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/API.txt,v retrieving revision 1.5.2.14 diff -u -p -r1.5.2.14 API.txt --- API.txt 23 Feb 2010 23:14:53 -0000 1.5.2.14 +++ API.txt 26 Feb 2010 17:49:30 -0000 @@ -12,6 +12,8 @@ API version 1.4: Generalized ctools_add_css(). Generalized ctools_add_js(). Generalized ctools_image_path(). + Deprecate the use of global hooks for plugin definition. Provide 'use hooks' + plugin option to re-enable their usage. API version 1.3.2: Introduce 'export callback' to individual fields in export.inc Index: help/plugins-creating.html =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/help/plugins-creating.html,v retrieving revision 1.9 diff -u -p -r1.9 plugins-creating.html --- help/plugins-creating.html 22 Jun 2009 02:27:19 -0000 1.9 +++ help/plugins-creating.html 26 Feb 2010 17:49:30 -0000 @@ -69,6 +69,8 @@ The following information can be specifi
If set to TRUE, then the plugin will look for a .info file instead of a .inc. Internally, this will look exactly the same, though obviously a .info file cannot contain functions. This can be good for styles that may not need to contain code.
extension
Can be used to change the extension on a file. By default the extension will be "inc", though it will default to "info" if "info files" is set to true. Do not include the dot in the extension if changing it, that will be added automatically.
+
use hooks
+
Can be used re-enable support for deprecated plugin definition hooks. This only applies to global module definition hooks not hooks from plugin includes which are not deprecated.
In addition, there is a 'module', 'type' and 'hook' settings; these are for internal use of the plugin system and you should not change these. Index: includes/plugins.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/plugins.inc,v retrieving revision 1.18.2.12 diff -u -p -r1.18.2.12 plugins.inc --- includes/plugins.inc 24 Feb 2010 01:51:21 -0000 1.18.2.12 +++ includes/plugins.inc 26 Feb 2010 17:49:30 -0000 @@ -202,7 +202,7 @@ function ctools_get_plugins($module, $ty if ((!$id || $info[$module][$type]['cache']) && empty($setup[$module][$type])) { $setup[$module][$type] = TRUE; $plugins[$module][$type] = array(); - if (!empty($info['use hooks'])) { + if (!empty($info[$module][$type]['use hooks'])) { $plugins[$module][$type] = ctools_plugin_load_hooks($info[$module][$type]); } $plugins[$module][$type] = array_merge($plugins[$module][$type], ctools_plugin_load_includes($info[$module][$type]));