function template_preprocess_views_foundation_pricing_tables in Views Foundation 7
Same name and namespace in other branches
- 7.4 theme/views_foundation.theme.inc \template_preprocess_views_foundation_pricing_tables()
Theme the Foundation Pricing Tables row.
File
- theme/
views_foundation.theme.inc, line 159 - The theme system, which controls the output of views foundation plugins.
Code
function template_preprocess_views_foundation_pricing_tables(&$variables) {
$view = $variables['view'];
$options = $variables['options'];
$variables['fields'] = array(
'title_field' => '',
'description_field' => '',
'price_field' => '',
'bullet_fields' => array(),
'button_field' => '',
);
foreach ($view->field as $id => $field) {
$item = $view->field[$id]
->theme($variables['row']);
if ($options['title_field'] == $id) {
$variables['fields']['title_field'] = $item;
}
elseif ($options['price_field'] == $id) {
$variables['fields']['price_field'] = $item;
}
elseif ($options['description_field'] == $id) {
$variables['fields']['description_field'] = $item;
}
elseif ($options['button_field'] == $id) {
$variables['fields']['button_field'] = $item;
}
elseif ($field) {
$variables['fields']['bullet_fields'][] = $item;
}
}
}