*/ public static function types(): array { $types = [ 'list' => esc_html__('List', 'daytidy'), 'grid' => esc_html__('Grid', 'daytidy'), 'full_calendar' => esc_html__('Full Calendar', 'daytidy'), ]; return (array) apply_filters('DayTidy/F__DayTidy/Views__types/types', $types); } /** * @return array> */ public static function styles(?string $type = null): array { $styles = [ 'list' => [ 'default' => esc_html__('Default', 'daytidy'), ], 'grid' => [ 'default' => esc_html__('Default', 'daytidy'), ], 'full_calendar' => [ 'default' => esc_html__('Default', 'daytidy'), ], ]; $styles = (array) apply_filters('DayTidy/F__DayTidy/Views__styles/styles', $styles, $type); if ($type) return isset($styles[$type]) && is_array($styles[$type]) ? $styles[$type] : []; return $styles; } /** * @return array */ public static function statuses(): array { return [ 'upcoming' => esc_html__('Upcoming', 'daytidy'), 'ongoing' => esc_html__('Ongoing', 'daytidy'), 'expired' => esc_html__('Expired', 'daytidy'), ]; } /** * @return array */ public static function sessionModes(): array { $modes = [ 'all' => esc_html__('All matching sessions', 'daytidy'), 'one' => esc_html__('One session per offering', 'daytidy'), ]; return (array) apply_filters('DayTidy/F__DayTidy/Views__session_modes/modes', $modes); } /** * @return array */ public static function dateRangeModes(): array { $modes = [ 'none' => esc_html__('No limit', 'daytidy'), 'today' => esc_html__('Today', 'daytidy'), 'tomorrow' => esc_html__('Tomorrow', 'daytidy'), 'yesterday' => esc_html__('Yesterday', 'daytidy'), 'start_previous_month' => esc_html__('Start of Previous Month', 'daytidy'), 'start_current_month' => esc_html__('Start of Current Month', 'daytidy'), 'start_next_month' => esc_html__('Start of Next Month', 'daytidy'), 'end_previous_month' => esc_html__('End of Previous Month', 'daytidy'), 'end_current_month' => esc_html__('End of Current Month', 'daytidy'), 'end_next_month' => esc_html__('End of Next Month', 'daytidy'), 'fixed' => esc_html__('Fixed date', 'daytidy'), 'relative' => esc_html__('Relative offset', 'daytidy'), ]; return (array) apply_filters('DayTidy/F__DayTidy/Views__date_range_modes/modes', $modes); } /** * @return array */ public static function dateRangeDirections(): array { return [ 'future' => esc_html__('In the future', 'daytidy'), 'past' => esc_html__('In the past', 'daytidy'), ]; } /** * @return array */ public static function dateRangeUnits(): array { return [ 'days' => esc_html__('Days', 'daytidy'), 'weeks' => esc_html__('Weeks', 'daytidy'), 'months' => esc_html__('Months', 'daytidy'), 'years' => esc_html__('Years', 'daytidy'), ]; } /** * @return array */ public static function paginationMethods(): array { $methods = [ 'load_more' => esc_html__('Load More Button', 'daytidy'), 'infinite_scroll' => esc_html__('Infinite Scroll', 'daytidy'), ]; return (array) apply_filters('DayTidy/F__DayTidy/Views__pagination_methods/methods', $methods); } /** * @return array */ public static function linkMethods(): array { $methods = [ 'same' => esc_html__('Same Window', 'daytidy'), 'new' => esc_html__('New Window', 'daytidy'), ]; return (array) apply_filters('DayTidy/F__DayTidy/Views__link_methods/methods', $methods); } /** * @return array */ public static function displayOptions(): array { $options = [ 'common' => [ 'show_image' => true, 'show_title' => true, 'show_datetime' => true, 'show_excerpt' => true, 'show_taxonomies' => true, 'show_offering_data' => false, 'show_action' => true, ], 'list' => [ 'image_position' => 'left', 'excerpt_length' => 24, ], 'grid' => [ 'columns' => 3, 'image_ratio' => '16/9', 'excerpt_length' => 18, ], 'full_calendar' => [ 'default_view' => 'dayGridMonth', 'enabled_views' => ['dayGridMonth', 'timeGridWeek', 'timeGridDay'], 'show_session_time' => true, 'height' => '', 'aspect_ratio' => '1.35', ], ]; return (array) apply_filters('DayTidy/F__DayTidy/Views__display_options/options', $options); } /** * @return array */ public static function calendarViews(): array { return [ 'dayGridMonth' => esc_html__('Month', 'daytidy'), 'timeGridWeek' => esc_html__('Week', 'daytidy'), 'timeGridDay' => esc_html__('Day', 'daytidy'), ]; } /** * @return array */ public static function repeatTypes(): array { return RepeatTypes::get(); } }