You are here

function empty_fields_preprocess_field in Empty fields 7.2

Implements hook_preprocess_field().

File

./empty_fields.module, line 291
Contains the implementation for the empty_fields module.

Code

function empty_fields_preprocess_field(&$variables) {
  if (!empty($variables['element']['#empty_fields_empty_class'])) {
    $classes = explode(' ', $variables['element']['#empty_fields_empty_class']);
    $classes = array_map('drupal_html_class', $classes);
    $variables['classes_array'] = array_unique(array_merge($variables['classes_array'], array_filter($classes)));
  }
}