function hook_ctools_plugin_pre_alter

Alter a plugin before it has been processed.

This hook is useful for altering flags or other information that will be used or possibly overriden by the process hook if defined.

Parameters

array $plugin: An associative array defining a plugin.

array $info: An associative array of plugin type info.

1 invocation of hook_ctools_plugin_pre_alter()
_ctools_process_data in includes/plugins.inc
Fill in default values and run hooks for data loaded for one or more plugins.

File

./ctools.api.php, line 114

Code

function hook_ctools_plugin_pre_alter(array &$plugin, array &$info) {
    // Override a function defined by the plugin.
    if ($info['type'] == 'my_type') {
        $plugin['my_flag'] = 'new_value';
    }
}