You are here

function og_colors_classes in Colors 7

Implements hook_colors_classes().

Provide colors per og type.

File

includes/og.colors.inc, line 41
Provides Color integration on behalf of og.module.

Code

function og_colors_classes($entity) {
  $class_names = array();
  if (variable_get('colors_og_enabled', FALSE)) {
    list($id) = entity_extract_ids($entity->entity_type, $entity);
    if (!empty($id)) {
      foreach (og_get_entity_groups($entity->entity_type, $entity) as $gid) {
        $class_names[] = 'colors_og_' . $gid;
      }
    }
  }
  return $class_names;
}