123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <?php
- function hook_ctools_plugin_type() {
- $plugins['my_type'] = array(
- 'load themes' => TRUE,
- );
- return $plugins;
- }
- function hook_ctools_plugin_directory($owner, $plugin_type) {
-
-
-
- if ($owner == 'ctools' && $plugin_type == 'content_types') {
- return 'plugins/content_types';
- }
-
-
-
-
-
-
- if ($owner == 'panels') {
- return "plugins/$plugin_type";
- }
-
-
-
- if ($owner == 'mymodule') {
-
- return "plugins/$plugin_type";
- }
-
- }
- function hook_ctools_plugin_pre_alter(&$plugin, &$info) {
-
- if ($info['type'] == 'my_type') {
- $plugin['my_flag'] = 'new_value';
- }
- }
- function hook_ctools_plugin_post_alter(&$plugin, &$info) {
-
- if ($info['type'] == 'my_type') {
- $plugin['my_function'] = 'new_function';
- }
- }
- function hook_ctools_api_hook_alter(&$list) {
-
- $list['node']['path'] = drupal_get_path('module', 'node');
- }
- function hook_ctools_math_expression_functions_alter(&$functions) {
-
- $functions[] = 'deg2rad';
- }
- function hook_ctools_render_alter(&$info, &$page, &$context) {
- if ($context['handler']->name == 'my_handler') {
- ctools_add_css('my_module.theme', 'my_module');
- }
- }
- function hook_ctools_content_subtype_alter($subtype, $plugin) {
- $subtype['render last'] = TRUE;
- }
- 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;
- }
- }
- function hook_ctools_entity_contexts_alter(&$plugins) {
- $plugins['entity_id:taxonomy_term']['no ui'] = TRUE;
- }
- function hook_ctools_cleanstring_alter(&$settings) {
-
- $settings['lower case'] = TRUE;
- }
- function hook_ctools_cleanstring_CLEAN_ID_alter(&$settings) {
-
- $settings['lower case'] = TRUE;
- }
|