diff --git a/includes/sp-event-admin-week-filter.php b/includes/sp-event-admin-week-filter.php index b29ff3c..113153b 100644 --- a/includes/sp-event-admin-week-filter.php +++ b/includes/sp-event-admin-week-filter.php @@ -37,6 +37,36 @@ function tony_sportspress_event_filter_meta_key( $key ) { return 'tony_sp_event_filter_' . $key; } +/** + * Get the current singular label for event venues. + * + * @return string + */ +function tony_sportspress_get_event_venue_label() { + $taxonomy = get_taxonomy( 'sp_venue' ); + + if ( $taxonomy && ! empty( $taxonomy->labels->singular_name ) ) { + return (string) $taxonomy->labels->singular_name; + } + + return __( 'Venue', 'sportspress' ); +} + +/** + * Get the current plural label for event venues. + * + * @return string + */ +function tony_sportspress_get_event_venue_label_plural() { + $taxonomy = get_taxonomy( 'sp_venue' ); + + if ( $taxonomy && ! empty( $taxonomy->labels->name ) ) { + return (string) $taxonomy->labels->name; + } + + return __( 'Venues', 'sportspress' ); +} + /** * Normalize event filter visibility rules. * @@ -131,9 +161,9 @@ function tony_sportspress_event_filter_screen_options_markup( $settings, $screen $labels = array( 'month' => __( 'Month/Year', 'tonys-sportspress-enhancements' ), - 'week' => __( 'Week', 'tonys-sportspress-enhancements' ), + 'week' => __( 'Year/Week', 'tonys-sportspress-enhancements' ), 'team' => __( 'Team', 'tonys-sportspress-enhancements' ), - 'venue' => __( 'Venue', 'tonys-sportspress-enhancements' ), + 'venue' => tony_sportspress_get_event_venue_label(), 'league' => __( 'League', 'tonys-sportspress-enhancements' ), 'season' => __( 'Season', 'tonys-sportspress-enhancements' ), 'match_day' => __( 'Match Day', 'tonys-sportspress-enhancements' ), @@ -267,7 +297,7 @@ function tony_sportspress_render_admin_week_filter( $post_type ) { class="sp-week-filter-field" title="" > - +