You are here

function farm_quantity_preprocess_field in farmOS 7

Implements hook_preprocess_field().

File

modules/farm/farm_quantity/farm_quantity.module, line 329
Farm quantity module.

Code

function farm_quantity_preprocess_field(&$vars) {

  // Add quantity CSS when a Quantity field is displayed.
  if (!empty($vars['element']['#field_name']) && $vars['element']['#field_name'] == 'field_farm_quantity') {
    drupal_add_css(drupal_get_path('module', 'farm_quantity') . '/farm_quantity.css');
  }
}