From 5825cf1cfc1388814730284f11908758d64e6719 Mon Sep 17 00:00:00 2001 From: savvasha Date: Fri, 30 Mar 2018 18:53:59 +0300 Subject: [PATCH] Add Featured Image support to Event Countdown widget --- modules/sportspress-countdowns.php | 7 +++++++ templates/countdown.php | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/modules/sportspress-countdowns.php b/modules/sportspress-countdowns.php index 0c408efe..d1b42872 100644 --- a/modules/sportspress-countdowns.php +++ b/modules/sportspress-countdowns.php @@ -88,6 +88,13 @@ class SportsPress_Countdowns { 'default' => 'no', 'type' => 'checkbox', ), + array( + 'title' => __( 'Featured Image', 'sportspress' ), + 'desc' => __( 'Display featured image of event', 'sportspress' ), + 'id' => 'sportspress_countdown_show_featured_image', + 'default' => 'no', + 'type' => 'checkbox', + ), )), array( diff --git a/templates/countdown.php b/templates/countdown.php index e307796c..194b9336 100644 --- a/templates/countdown.php +++ b/templates/countdown.php @@ -21,6 +21,7 @@ $defaults = array( 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'link_venues' => get_option( 'sportspress_link_venues', 'no' ) == 'yes' ? true : false, 'show_logos' => get_option( 'sportspress_countdown_show_logos', 'no' ) == 'yes' ? true : false, + 'show_feat_image' => get_option( 'sportspress_countdown_show_featured_image', 'no' ) == 'yes' ? true : false, ); if ( isset( $id ) ): $post = get_post( $id ); @@ -75,6 +76,13 @@ if ( $link_events ) $title = '
+ +

+ +

+