Filters
Class managing Filters loading for the Views V2.
Source
File: src/Tribe/Views/V2/Filters.php
class Filters { /** * Which layout setting the user picker for their filters. * * @since 4.9.0 * * @return string Either `vertical` or `horizotal` values are allowed only here. */ public function get_layout_setting() { $default = 'vertical'; $allowed = [ 'horizontal', $default ]; $value = (string) tribe_get_option( 'events_filters_layout', $default ); return esc_attr( in_array( $value, $allowed ) ? $value : $default ); } }
Changelog
Version | Description |
---|---|
4.9.0 | Introduced. |
Methods
- get_layout_setting — Which layout setting the user picker for their filters.
- should_display_filters — Get whether filters should display or not.