function hook_colors_info in Colors 7
Declare a colors plugin.
Return value
array An associative array containing one or more coloring types, keyed by the type name, containing an associative array with the following keys:
- title: The untranslated display name of this type.
- short_description: The text to display for the checkbox.
- long_description: The text to describe the fieldset.
- function: The callback for gathering the type options.
- multiple_function: (optional) If the type contains sub-types, this will be used as the top-level callback.
- validate: (optional) A boolean, if TRUE an additional form validation
- handler, colors_admin_TYPE_settings_validate(), will be used.
- submit: (optional) A boolean, if TRUE an additional form submission handler, colors_admin_TYPE_settings_submit(), will be used.
4 functions implement hook_colors_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- node_colors_info in includes/
node.colors.inc - Implements hook_colors_info().
- og_colors_info in includes/
og.colors.inc - Implements hook_colors_info().
- taxonomy_colors_info in includes/
taxonomy.colors.inc - Implements hook_colors_info().
- user_colors_info in includes/
user.colors.inc - Implements hook_colors_info().
4 invocations of hook_colors_info()
- colors_admin_settings in includes/
colors.admin.inc - Form constructor for the Colors admin form.
- colors_create_css in ./
colors.module - Retrieves or generates a CSS file with a given module's selector.
- colors_generate_settings_form in includes/
colors.admin.inc - Generate an admin form for each Colors plugin.
- colors_menu in ./
colors.module - Implements hook_menu().
File
- ./
colors.api.php, line 70 - Hooks provided by the Colors module.
Code
function hook_colors_info() {
return array(
'node_type' => array(
'title' => 'Node type',
'short_description' => t('Enable colors for node types'),
'long_description' => t('Colors for node types. If enabled, you may set colors for each node type below.'),
'function' => 'node_type_get_names',
),
);
}