Create a gist now

Instantly share code, notes, and snippets.

<?php
/**
* @file
* Module ffc_colorbox module file.
*/
/**
* Implements hook_preprocess_field().
*/
function ffc_colorbox_preprocess_field(&$variables) {
if ($variables['element']['#formatter'] == 'colorbox') {
$style = $variables['items'][0]['#display_settings']['colorbox_node_style'];
$variables['classes_array'][] = drupal_html_class('colorbox-style-' . $style);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment