function flipping_book_reference_views_filter_options in Flipping Book 7
Options callback for the views_handler_filter_in_operator filter.
Parameters
string $field_name: The field name.
1 string reference to 'flipping_book_reference_views_filter_options'
File
- ./
flipping_book_reference.module, line 763 - Defines a field type for referencing one flipping_book from a node.
Code
function flipping_book_reference_views_filter_options($field_name) {
$options = array();
if ($field = field_info_field($field_name)) {
$options = _flipping_book_reference_options($field, TRUE);
// The options are displayed in checkboxes within the filter admin form, and
// in a select within an exposed filter. Checkboxes accept HTML, other
// entities should be encoded; selects require the exact opposite: no HTML,
// no encoding. We go for a middle ground: strip tags, leave entities
// unencoded.
foreach ($options as $key => $value) {
$options[$key] = strip_tags($value);
}
}
return $options;
}