You are here

function template_preprocess_field_orbit in ZURB Orbit 8

Same name and namespace in other branches
  1. 7.2 field_orbit.module \template_preprocess_field_orbit()
  2. 7 field_orbit.module \template_preprocess_field_orbit()

Implements template_preprocess().

File

./field_orbit.module, line 31
Implement a orbit formatter for fields.

Code

function template_preprocess_field_orbit(&$variables) {
  if (count($variables['options'])) {
    $variables['data_options'] = '';
    foreach ($variables['options'] as $key => $value) {
      if (strlen($value)) {
        $variables['data_options'] .= $key . ': ' . str_replace("'", '', $value) . '; ';
      }
    }
  }
}