function hook_colors_classes in Colors 7
Provide a way for modules to add the classes used to their markup.
Parameters
object $entity: The entity object.
5 functions implement hook_colors_classes()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- field_collection_colors_classes in includes/
field_collection.colors.inc - Implements hook_colors_classes().
- node_colors_classes in includes/
node.colors.inc - Implements hook_colors_classes().
- og_colors_classes in includes/
og.colors.inc - Implements hook_colors_classes().
- taxonomy_colors_classes in includes/
taxonomy.colors.inc - Implements hook_colors_classes().
- user_colors_classes in includes/
user.colors.inc - Implements hook_colors_classes().
1 invocation of hook_colors_classes()
- field_collection_colors_classes in includes/
field_collection.colors.inc - Implements hook_colors_classes().
File
- ./
colors.api.php, line 87 - Hooks provided by the Colors module.
Code
function hook_colors_classes($entity) {
$class_names = array();
if (variable_get('colors_node_type_enabled', FALSE)) {
if ($entity->entity_type == 'node') {
$class_names[] = 'colors-node-type-' . $entity->type;
}
}
return $class_names;
}