diff --git a/ctools.api.php b/ctools.api.php index 1aef57c..a7ab783 100644 --- a/ctools.api.php +++ b/ctools.api.php @@ -203,5 +203,66 @@ function hook_ctools_content_subtype_alter($subtype, $plugin) { } /** + * Alter the definition of an entity context plugin. + * + * @param array $plugin + * An associative array defining a plugin. + * @param array $entity + * The entity info array of a specific entity type. + * @param string $plugin_id + * The plugin ID, in the format NAME:KEY. + */ +function hook_ctools_entity_context_alter(&$plugin, &$entity, $plugin_id) { + ctools_include('context'); + switch ($plugin_id) { + case 'entity_id:taxonomy_term': + $plugin['no ui'] = TRUE; + case 'entity:user': + $plugin = ctools_get_context('user'); + unset($plugin['no ui']); + unset($plugin['no required context ui']); + break; + } +} + +/** + * Alter the definition of entity context plugins. + * + * @param array $plugins + * An associative array of plugin definitions, keyed by plugin ID. + * + * @see hook_ctools_entity_context_alter() + */ +function hook_ctools_entity_contexts_alter(&$plugins) { + $plugins['entity_id:taxonomy_term']['no ui'] = TRUE; +} + +/** + * Change cleanstring settings. + * + * @param array $settings + * An associative array of cleanstring settings. + * + * @see ctools_cleanstring() + */ +function hook_ctools_cleanstring_alter(&$settings) { + // Convert all strings to lower case. + $settings['lower case'] = TRUE; +} + +/** + * Change cleanstring settings for a specific clean ID. + * + * @param array $settings + * An associative array of cleanstring settings. + * + * @see ctools_cleanstring() + */ +function hook_ctools_cleanstring_CLEAN_ID_alter(&$settings) { + // Convert all strings to lower case. + $settings['lower case'] = TRUE; +} + +/** * @} End of "addtogroup hooks". */ diff --git a/ctools.module b/ctools.module index 7dfc989..6859610 100644 --- a/ctools.module +++ b/ctools.module @@ -815,6 +815,9 @@ function ctools_ajax_theme_callback() { } } +/** + * Implements hook_ctools_entity_context_alter(). + */ function ctools_ctools_entity_context_alter(&$plugin, &$entity, $plugin_id) { ctools_include('context'); switch ($plugin_id) { diff --git a/page_manager/page_manager.api.php b/page_manager/page_manager.api.php new file mode 100644 index 0000000..03e2e75 --- /dev/null +++ b/page_manager/page_manager.api.php @@ -0,0 +1,39 @@ +