From bd27f419773301100e63e014ef6d374af86fb78b Mon Sep 17 00:00:00 2001 From: savvasha Date: Sat, 25 Aug 2018 18:31:55 +0300 Subject: [PATCH] Add Matchday to Event-Block Template. --- modules/sportspress-calendars.php | 8 ++++++++ templates/event-blocks.php | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/modules/sportspress-calendars.php b/modules/sportspress-calendars.php index 74ed1504..6f7e3b53 100644 --- a/modules/sportspress-calendars.php +++ b/modules/sportspress-calendars.php @@ -344,6 +344,14 @@ class SportsPress_Calendars { 'type' => 'checkbox', 'checkboxgroup' => '', ), + + array( + 'desc' => __( 'Display matchday', 'sportspress' ), + 'id' => 'sportspress_event_blocks_show_matchday', + 'default' => 'no', + 'type' => 'checkbox', + 'checkboxgroup' => '', + ), array( 'desc' => __( 'Display venue', 'sportspress' ), diff --git a/templates/event-blocks.php b/templates/event-blocks.php index cbb8b907..e8d578f4 100644 --- a/templates/event-blocks.php +++ b/templates/event-blocks.php @@ -38,6 +38,7 @@ $defaults = array( 'show_title' => get_option( 'sportspress_event_blocks_show_title', 'no' ) == 'yes' ? true : false, 'show_league' => get_option( 'sportspress_event_blocks_show_league', 'no' ) == 'yes' ? true : false, 'show_season' => get_option( 'sportspress_event_blocks_show_season', 'no' ) == 'yes' ? true : false, + 'show_matchday' => get_option( 'sportspress_event_blocks_show_matchday', 'no' ) == 'yes' ? true : false, 'show_venue' => get_option( 'sportspress_event_blocks_show_venue', 'no' ) == 'yes' ? true : false, 'hide_if_empty' => false, ); @@ -149,6 +150,9 @@ if ( $title ) + ID, 'sp_day', true ); if ( $matchday != '' ): ?> +
()
+
' . implode( ' - ', apply_filters( 'sportspress_event_blocks_team_result_or_time', sp_get_main_results_or_time( $event ), $event->ID ) ) . '', $permalink, $link_events ); ?>