Changeset 2319513
- Timestamp:
- 06/06/2020 03:02:25 PM (6 years ago)
- Location:
- sportspress
- Files:
-
- 12 edited
- 1 copied
-
tags/2.7.2 (copied) (copied from sportspress/trunk)
-
tags/2.7.2/changelog.txt (modified) (1 diff)
-
tags/2.7.2/includes/admin/settings/class-sp-settings-events.php (modified) (2 diffs)
-
tags/2.7.2/includes/widgets/class-sp-widget-countdown.php (modified) (6 diffs)
-
tags/2.7.2/readme.txt (modified) (2 diffs)
-
tags/2.7.2/sportspress.php (modified) (3 diffs)
-
tags/2.7.2/templates/countdown.php (modified) (5 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/admin/settings/class-sp-settings-events.php (modified) (2 diffs)
-
trunk/includes/widgets/class-sp-widget-countdown.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/sportspress.php (modified) (3 diffs)
-
trunk/templates/countdown.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sportspress/tags/2.7.2/changelog.txt
r2280658 r2319513 1 1 == SportsPress Changelog == 2 3 = 2.7.2 = 4 * Tweak - Sanitize delimiter field in event settings. 2 5 3 6 = 2.7.1 = -
sportspress/tags/2.7.2/includes/admin/settings/class-sp-settings-events.php
r2097227 r2319513 6 6 * @category Admin 7 7 * @package SportsPress/Admin 8 * @version 2. 6.158 * @version 2.7.1.2 9 9 */ 10 10 … … 470 470 471 471 if ( isset( $_POST['sportspress_event_teams_delimiter'] ) ) 472 update_option( 'sportspress_event_teams_delimiter', $_POST['sportspress_event_teams_delimiter']);472 update_option( 'sportspress_event_teams_delimiter', sanitize_text_field( $_POST['sportspress_event_teams_delimiter'] ) ); 473 473 } 474 474 -
sportspress/tags/2.7.2/includes/widgets/class-sp-widget-countdown.php
r1986732 r2319513 17 17 $show_league = empty($instance['show_league']) ? false : $instance['show_league']; 18 18 $show_date = empty($instance['show_date']) ? false : $instance['show_date']; 19 $show_excluded = empty($instance['show_excluded']) ? false : $instance['show_excluded']; 19 20 20 21 do_action( 'sportspress_before_widget', $args, $instance, 'countdown' ); … … 27 28 do_action( 'sportspress_before_widget_template', $args, $instance, 'countdown' ); 28 29 29 sp_get_template( 'countdown.php', array( 'calendar' => $calendar, 'team' => $team, 'id' => $id, 'title' => $caption, 'show_venue' => $show_venue, 'show_league' => $show_league, 'show_date' => $show_date ) );30 sp_get_template( 'countdown.php', array( 'calendar' => $calendar, 'team' => $team, 'id' => $id, 'title' => $caption, 'show_venue' => $show_venue, 'show_league' => $show_league, 'show_date' => $show_date, 'show_excluded' => $show_excluded ) ); 30 31 31 32 // Action to hook into … … 46 47 $instance['show_league'] = intval($new_instance['show_league']); 47 48 $instance['show_date'] = intval($new_instance['show_date']); 49 $instance['show_excluded'] = intval($new_instance['show_excluded']); 48 50 49 51 // Filter to hook into … … 54 56 55 57 function form( $instance ) { 56 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'calendar' => '', 'team' => '', 'id' => '', 'caption' => '', 'show_venue' => false, 'show_league' => false, 'show_date' => false ) );58 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'calendar' => '', 'team' => '', 'id' => '', 'caption' => '', 'show_venue' => false, 'show_league' => false, 'show_date' => false, 'show_excluded' => false ) ); 57 59 $title = strip_tags($instance['title']); 58 60 $caption = strip_tags($instance['caption']); … … 63 65 $show_league = intval($instance['show_league']); 64 66 $show_date = intval($instance['show_date']); 67 $show_excluded = intval($instance['show_excluded']); 65 68 66 69 // Action to hook into … … 136 139 <label for="<?php echo $this->get_field_id('show_date'); ?>"><?php _e( 'Display date', 'sportspress' ); ?></label></p> 137 140 141 <p><input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_excluded'); ?>" name="<?php echo $this->get_field_name('show_excluded'); ?>" value="1" <?php checked( $show_excluded, 1 ); ?>> 142 <label for="<?php echo $this->get_field_id('show_excluded'); ?>"><?php _e( 'Display excluded events', 'sportspress' ); ?></label></p> 143 138 144 <?php 139 145 // Action to hook into -
sportspress/tags/2.7.2/readme.txt
r2280658 r2319513 5 5 Requires at least: 3.8 6 6 Tested up to: 5.3 7 Stable tag: 2.7. 17 Stable tag: 2.7.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 240 240 241 241 == Changelog == 242 243 = 2.7.2 = 244 * Tweak - Sanitize delimiter field in event settings. 242 245 243 246 = 2.7.1 = -
sportspress/tags/2.7.2/sportspress.php
r2280658 r2319513 4 4 * Plugin URI: http://themeboy.com/sportspress/ 5 5 * Description: Manage your club and its players, staff, events, league tables, and player lists. 6 * Version: 2.7. 16 * Version: 2.7.2 7 7 * Author: ThemeBoy 8 8 * Author URI: http://themeboy.com … … 27 27 * 28 28 * @class SportsPress 29 * @version 2.7. 129 * @version 2.7.2 30 30 */ 31 31 final class SportsPress { … … 34 34 * @var string 35 35 */ 36 public $version = '2.7. 1';36 public $version = '2.7.2'; 37 37 38 38 /** -
sportspress/tags/2.7.2/templates/countdown.php
r2280658 r2319513 24 24 'show_thumbnail' => get_option( 'sportspress_countdown_show_thumbnail', 'no' ) == 'yes' ? true : false, 25 25 ); 26 27 if ( isset( $show_excluded ) && $show_excluded ){ 28 $excluded_statuses = array(); 29 }else{ 30 $excluded_statuses = apply_filters( 'sp_countdown_excluded_statuses', array( 31 'postponed', 32 'cancelled', 33 ) ); 34 } 35 26 36 if ( isset( $id ) ): 27 37 $post = get_post( $id ); … … 37 47 * Exclude postponed or cancelled events. 38 48 */ 39 $excluded_statuses = apply_filters( 'sp_countdown_excluded_statuses', array(40 'postponed',41 'cancelled',42 ) );43 49 while ( $post = array_shift( $data ) ) { 44 50 $sp_status = get_post_meta($post->ID, 'sp_status', true); … … 81 87 'key' => 'sp_status', 82 88 'compare' => 'NOT IN', 83 'value' => apply_filters( 'sp_countdown_excluded_statuses', array( 84 'postponed', 85 'cancelled', 86 ) ), 89 'value' => $excluded_statuses, 87 90 ]; 88 91 … … 99 102 $title = $post->post_title; 100 103 if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false, true ) . '">' . $title . '</a>'; 104 $sp_status = get_post_meta($post->ID, 'sp_status', true); 105 $statuses = apply_filters( 'sportspress_event_statuses', array( 106 'ok' => __( 'On time', 'sportspress' ), 107 'tbd' => __( 'TBD', 'sportspress' ), 108 'postponed' => __( 'Postponed', 'sportspress' ), 109 'cancelled' => __( 'Canceled', 'sportspress' ), 110 ) ); 101 111 ?> 102 112 <div class="sp-template sp-template-countdown"> … … 129 139 } 130 140 ?> 131 <?php echo $title ; ?>141 <?php echo $title.' ('.$statuses[ $sp_status ].')'; ?> 132 142 </h3> 133 143 <?php -
sportspress/trunk/changelog.txt
r2280658 r2319513 1 1 == SportsPress Changelog == 2 3 = 2.7.2 = 4 * Tweak - Sanitize delimiter field in event settings. 2 5 3 6 = 2.7.1 = -
sportspress/trunk/includes/admin/settings/class-sp-settings-events.php
r2097227 r2319513 6 6 * @category Admin 7 7 * @package SportsPress/Admin 8 * @version 2. 6.158 * @version 2.7.1.2 9 9 */ 10 10 … … 470 470 471 471 if ( isset( $_POST['sportspress_event_teams_delimiter'] ) ) 472 update_option( 'sportspress_event_teams_delimiter', $_POST['sportspress_event_teams_delimiter']);472 update_option( 'sportspress_event_teams_delimiter', sanitize_text_field( $_POST['sportspress_event_teams_delimiter'] ) ); 473 473 } 474 474 -
sportspress/trunk/includes/widgets/class-sp-widget-countdown.php
r1986732 r2319513 17 17 $show_league = empty($instance['show_league']) ? false : $instance['show_league']; 18 18 $show_date = empty($instance['show_date']) ? false : $instance['show_date']; 19 $show_excluded = empty($instance['show_excluded']) ? false : $instance['show_excluded']; 19 20 20 21 do_action( 'sportspress_before_widget', $args, $instance, 'countdown' ); … … 27 28 do_action( 'sportspress_before_widget_template', $args, $instance, 'countdown' ); 28 29 29 sp_get_template( 'countdown.php', array( 'calendar' => $calendar, 'team' => $team, 'id' => $id, 'title' => $caption, 'show_venue' => $show_venue, 'show_league' => $show_league, 'show_date' => $show_date ) );30 sp_get_template( 'countdown.php', array( 'calendar' => $calendar, 'team' => $team, 'id' => $id, 'title' => $caption, 'show_venue' => $show_venue, 'show_league' => $show_league, 'show_date' => $show_date, 'show_excluded' => $show_excluded ) ); 30 31 31 32 // Action to hook into … … 46 47 $instance['show_league'] = intval($new_instance['show_league']); 47 48 $instance['show_date'] = intval($new_instance['show_date']); 49 $instance['show_excluded'] = intval($new_instance['show_excluded']); 48 50 49 51 // Filter to hook into … … 54 56 55 57 function form( $instance ) { 56 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'calendar' => '', 'team' => '', 'id' => '', 'caption' => '', 'show_venue' => false, 'show_league' => false, 'show_date' => false ) );58 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'calendar' => '', 'team' => '', 'id' => '', 'caption' => '', 'show_venue' => false, 'show_league' => false, 'show_date' => false, 'show_excluded' => false ) ); 57 59 $title = strip_tags($instance['title']); 58 60 $caption = strip_tags($instance['caption']); … … 63 65 $show_league = intval($instance['show_league']); 64 66 $show_date = intval($instance['show_date']); 67 $show_excluded = intval($instance['show_excluded']); 65 68 66 69 // Action to hook into … … 136 139 <label for="<?php echo $this->get_field_id('show_date'); ?>"><?php _e( 'Display date', 'sportspress' ); ?></label></p> 137 140 141 <p><input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_excluded'); ?>" name="<?php echo $this->get_field_name('show_excluded'); ?>" value="1" <?php checked( $show_excluded, 1 ); ?>> 142 <label for="<?php echo $this->get_field_id('show_excluded'); ?>"><?php _e( 'Display excluded events', 'sportspress' ); ?></label></p> 143 138 144 <?php 139 145 // Action to hook into -
sportspress/trunk/readme.txt
r2280658 r2319513 5 5 Requires at least: 3.8 6 6 Tested up to: 5.3 7 Stable tag: 2.7. 17 Stable tag: 2.7.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 240 240 241 241 == Changelog == 242 243 = 2.7.2 = 244 * Tweak - Sanitize delimiter field in event settings. 242 245 243 246 = 2.7.1 = -
sportspress/trunk/sportspress.php
r2280658 r2319513 4 4 * Plugin URI: http://themeboy.com/sportspress/ 5 5 * Description: Manage your club and its players, staff, events, league tables, and player lists. 6 * Version: 2.7. 16 * Version: 2.7.2 7 7 * Author: ThemeBoy 8 8 * Author URI: http://themeboy.com … … 27 27 * 28 28 * @class SportsPress 29 * @version 2.7. 129 * @version 2.7.2 30 30 */ 31 31 final class SportsPress { … … 34 34 * @var string 35 35 */ 36 public $version = '2.7. 1';36 public $version = '2.7.2'; 37 37 38 38 /** -
sportspress/trunk/templates/countdown.php
r2280658 r2319513 24 24 'show_thumbnail' => get_option( 'sportspress_countdown_show_thumbnail', 'no' ) == 'yes' ? true : false, 25 25 ); 26 27 if ( isset( $show_excluded ) && $show_excluded ){ 28 $excluded_statuses = array(); 29 }else{ 30 $excluded_statuses = apply_filters( 'sp_countdown_excluded_statuses', array( 31 'postponed', 32 'cancelled', 33 ) ); 34 } 35 26 36 if ( isset( $id ) ): 27 37 $post = get_post( $id ); … … 37 47 * Exclude postponed or cancelled events. 38 48 */ 39 $excluded_statuses = apply_filters( 'sp_countdown_excluded_statuses', array(40 'postponed',41 'cancelled',42 ) );43 49 while ( $post = array_shift( $data ) ) { 44 50 $sp_status = get_post_meta($post->ID, 'sp_status', true); … … 81 87 'key' => 'sp_status', 82 88 'compare' => 'NOT IN', 83 'value' => apply_filters( 'sp_countdown_excluded_statuses', array( 84 'postponed', 85 'cancelled', 86 ) ), 89 'value' => $excluded_statuses, 87 90 ]; 88 91 … … 99 102 $title = $post->post_title; 100 103 if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false, true ) . '">' . $title . '</a>'; 104 $sp_status = get_post_meta($post->ID, 'sp_status', true); 105 $statuses = apply_filters( 'sportspress_event_statuses', array( 106 'ok' => __( 'On time', 'sportspress' ), 107 'tbd' => __( 'TBD', 'sportspress' ), 108 'postponed' => __( 'Postponed', 'sportspress' ), 109 'cancelled' => __( 'Canceled', 'sportspress' ), 110 ) ); 101 111 ?> 102 112 <div class="sp-template sp-template-countdown"> … … 129 139 } 130 140 ?> 131 <?php echo $title ; ?>141 <?php echo $title.' ('.$statuses[ $sp_status ].')'; ?> 132 142 </h3> 133 143 <?php
Note: See TracChangeset
for help on using the changeset viewer.