function template_preprocess_isotope_views_sorter in Isotope (with Masonry and Packery) 7.2
Preprocess function for isotope sort blocks.
File
- isotope_views/
isotope_views.theme.inc, line 64 - Theme callbacks.
Code
function template_preprocess_isotope_views_sorter(&$vars) {
template_preprocess_views_view_list($vars);
$items = array();
foreach ($vars['options']['data_fields'] as $fieldname) {
if (!empty($fieldname)) {
$field = $vars['view']->field[$fieldname];
$label = $field->options['label'];
$items[$label] = $fieldname;
}
}
$output = array(
'#theme' => 'isotope_sorter',
'#sorts' => $items,
'#instance' => $vars['options']['instance_id'],
'#original' => $vars['options']['original'],
);
$vars['isotope_sorter'] = render($output);
}