Changeset 3043889
- Timestamp:
- 03/02/2024 05:59:41 AM (23 months ago)
- Location:
- sportspress
- Files:
-
- 1 added
- 35 edited
- 17 copied
-
tags/2.7.18 (added)
-
tags/2.7.18/CONTRIBUTING.md (copied) (copied from sportspress/trunk/CONTRIBUTING.md)
-
tags/2.7.18/README.md (copied) (copied from sportspress/trunk/README.md)
-
tags/2.7.18/assets (copied) (copied from sportspress/trunk/assets)
-
tags/2.7.18/changelog.txt (copied) (copied from sportspress/trunk/changelog.txt) (1 diff)
-
tags/2.7.18/dummy-data (copied) (copied from sportspress/trunk/dummy-data)
-
tags/2.7.18/feeds (copied) (copied from sportspress/trunk/feeds)
-
tags/2.7.18/includes (copied) (copied from sportspress/trunk/includes)
-
tags/2.7.18/includes/admin/class-sp-admin-permalink-settings.php (modified) (3 diffs)
-
tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php (modified) (2 diffs)
-
tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php (modified) (1 diff)
-
tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php (modified) (2 diffs)
-
tags/2.7.18/includes/sp-core-functions.php (modified) (3 diffs)
-
tags/2.7.18/includes/widgets/class-sp-widget-countdown.php (modified) (1 diff)
-
tags/2.7.18/includes/widgets/class-sp-widget-event-blocks.php (modified) (1 diff)
-
tags/2.7.18/includes/widgets/class-sp-widget-event-calendar.php (modified) (1 diff)
-
tags/2.7.18/includes/widgets/class-sp-widget-event-list.php (modified) (1 diff)
-
tags/2.7.18/includes/widgets/class-sp-widget-league-table.php (modified) (1 diff)
-
tags/2.7.18/includes/widgets/class-sp-widget-player-gallery.php (modified) (1 diff)
-
tags/2.7.18/includes/widgets/class-sp-widget-player-list.php (modified) (1 diff)
-
tags/2.7.18/includes/widgets/class-sp-widget-team-gallery.php (modified) (1 diff)
-
tags/2.7.18/index.php (copied) (copied from sportspress/trunk/index.php)
-
tags/2.7.18/languages (copied) (copied from sportspress/trunk/languages)
-
tags/2.7.18/license.txt (copied) (copied from sportspress/trunk/license.txt)
-
tags/2.7.18/modules (copied) (copied from sportspress/trunk/modules)
-
tags/2.7.18/presets (copied) (copied from sportspress/trunk/presets)
-
tags/2.7.18/readme.txt (copied) (copied from sportspress/trunk/readme.txt) (2 diffs)
-
tags/2.7.18/sportspress.php (copied) (copied from sportspress/trunk/sportspress.php) (3 diffs)
-
tags/2.7.18/templates (copied) (copied from sportspress/trunk/templates)
-
tags/2.7.18/templates/event-performance-table.php (modified) (3 diffs)
-
tags/2.7.18/templates/event-venue.php (modified) (2 diffs)
-
tags/2.7.18/templates/venue-map.php (modified) (2 diffs)
-
tags/2.7.18/uninstall.php (copied) (copied from sportspress/trunk/uninstall.php)
-
tags/2.7.18/wpml-config.xml (copied) (copied from sportspress/trunk/wpml-config.xml)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/admin/class-sp-admin-permalink-settings.php (modified) (3 diffs)
-
trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php (modified) (2 diffs)
-
trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php (modified) (1 diff)
-
trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php (modified) (2 diffs)
-
trunk/includes/sp-core-functions.php (modified) (3 diffs)
-
trunk/includes/widgets/class-sp-widget-countdown.php (modified) (1 diff)
-
trunk/includes/widgets/class-sp-widget-event-blocks.php (modified) (1 diff)
-
trunk/includes/widgets/class-sp-widget-event-calendar.php (modified) (1 diff)
-
trunk/includes/widgets/class-sp-widget-event-list.php (modified) (1 diff)
-
trunk/includes/widgets/class-sp-widget-league-table.php (modified) (1 diff)
-
trunk/includes/widgets/class-sp-widget-player-gallery.php (modified) (1 diff)
-
trunk/includes/widgets/class-sp-widget-player-list.php (modified) (1 diff)
-
trunk/includes/widgets/class-sp-widget-team-gallery.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/sportspress.php (modified) (3 diffs)
-
trunk/templates/event-performance-table.php (modified) (3 diffs)
-
trunk/templates/event-venue.php (modified) (2 diffs)
-
trunk/templates/venue-map.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sportspress/tags/2.7.18/changelog.txt
r3043887 r3043889 1 1 == SportsPress Changelog == 2 3 = 2.7.18 = 4 * Tweak - Only get staff template if enabled. 5 * Tweak - Show visible option only when "Auto" mode is selected. 6 * Fix - "None" option disappeared from dropdowns. 7 * Fix - Minutes not shown when image used as icon. 8 * Fix - Deprecated urlencode() notice. 9 * Fix - Null parameter notice. 10 * Fix - Undefined array key warnings. 11 * Fix - Add user capability check and nonce check when updating permalinks. 2 12 3 13 = 2.7.17 = -
sportspress/tags/2.7.18/includes/admin/class-sp-admin-permalink-settings.php
r3031980 r3043889 6 6 * @category Admin 7 7 * @package SportsPress/Admin 8 * @version 2.7.1 78 * @version 2.7.18 9 9 */ 10 10 … … 85 85 public function settings() { 86 86 echo wp_kses_post( wpautop( __( 'These settings control the permalinks used for SportsPress. These settings only apply when <strong>not using "default" permalinks above</strong>.', 'sportspress' ) ) ); 87 wp_nonce_field( plugin_basename( __FILE__ ), 'sp_permalink_nonce' ); 87 88 } 88 89 … … 91 92 */ 92 93 public function settings_save() { 93 if ( ! is_admin() ) { 94 return; 95 } 94 if ( ! is_admin() ) : 95 wp_die(); 96 endif; 97 98 if ( ! is_user_logged_in() ) : 99 wp_die(); 100 endif; 101 102 if ( ! current_user_can( 'manage_sportspress' ) ) : 103 wp_die(); 104 endif; 96 105 97 106 if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['sportspress_event_slug'] ) ) : 107 if ( ! isset( $_POST['sp_permalink_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['sp_permalink_nonce'] ), plugin_basename( __FILE__ ) ) ) : 108 return; 109 endif; 110 98 111 foreach ( $this->slugs as $slug ) : 99 112 $key = 'sportspress_' . $slug[0] . '_slug'; -
sportspress/tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php
r2878271 r3043889 6 6 * @category Admin 7 7 * @package SportsPress/Admin/Meta_Boxes 8 * @version 2.7. 98 * @version 2.7.18 9 9 */ 10 10 … … 267 267 'key' => 'sp_equation', 268 268 'compare' => 'NOT IN', 269 'value' => null,269 'value' => '', 270 270 ), 271 271 ), -
sportspress/tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php
r2629324 r3043889 6 6 * @category Admin 7 7 * @package SportsPress/Admin/Meta_Boxes 8 * @version 2.7. 98 * @version 2.7.18 9 9 */ 10 10 -
sportspress/tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php
r2629324 r3043889 42 42 if ( '' === $format ) { 43 43 $format = 'number'; 44 }45 if ( '' === $visible ) {46 $visible = 1;47 44 } 48 45 ?> … … 117 114 </select> 118 115 </p> 119 <p>120 <strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>121 <i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>122 </p>123 <ul class="sp-visible-selector">124 <li>125 <label class="selectit">126 <input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>127 <?php esc_attr_e( 'Yes', 'sportspress' ); ?>128 </label>129 </li>130 <li>131 <label class="selectit">132 <input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>133 <?php esc_attr_e( 'No', 'sportspress' ); ?>134 </label>135 </li>136 </ul>137 116 <?php 117 if ( 'auto' === get_option( 'sportspress_player_columns', 'auto' ) ) { 118 $visible = get_post_meta( $post->ID, 'sp_visible', true ); 119 if ( '' === $visible ) { 120 $visible = 1; 121 } 122 ?> 123 <p> 124 <strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong> 125 <i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i> 126 </p> 127 <ul class="sp-visible-selector"> 128 <li> 129 <label class="selectit"> 130 <input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>> 131 <?php esc_attr_e( 'Yes', 'sportspress' ); ?> 132 </label> 133 </li> 134 <li> 135 <label class="selectit"> 136 <input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>> 137 <?php esc_attr_e( 'No', 'sportspress' ); ?> 138 </label> 139 </li> 140 </ul> 141 <?php 142 } 143 144 do_action( 'sportspress_meta_box_statistic_details', $post ); 138 145 } 139 146 -
sportspress/tags/2.7.18/includes/sp-core-functions.php
r3031980 r3043889 8 8 * @category Core 9 9 * @package SportsPress/Functions 10 * @version 2.7.1 710 * @version 2.7.18 11 11 */ 12 12 … … 847 847 'values' => 'slug', 848 848 'class' => null, 849 'property' => null,849 'property' => 'none', 850 850 'placeholder' => null, 851 851 'chosen' => false, … … 983 983 'values' => 'post_name', 984 984 'class' => null, 985 'property' => null,985 'property' => 'none', 986 986 'placeholder' => null, 987 987 'chosen' => false, -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-countdown.php
r2629324 r3043889 66 66 $instance['caption'] = strip_tags( $new_instance['caption'] ); 67 67 $instance['id'] = intval( $new_instance['id'] ); 68 $instance['show_venue'] = i ntval( $new_instance['show_venue'] );69 $instance['show_league'] = i ntval( $new_instance['show_league'] );70 $instance['show_date'] = i ntval( $new_instance['show_date'] );71 $instance['show_excluded'] = i ntval( $new_instance['show_excluded'] );68 $instance['show_venue'] = isset( $new_instance['show_venue'] ) ? $new_instance['show_venue'] : false; 69 $instance['show_league'] = isset( $new_instance['show_league'] ) ? $new_instance['show_league'] : false; 70 $instance['show_date'] = isset( $new_instance['show_date'] ) ? $new_instance['show_date'] : false; 71 $instance['show_excluded'] = isset( $new_instance['show_excluded'] ) ? $new_instance['show_excluded'] : false; 72 72 $instance['order'] = strip_tags( $new_instance['order'] ); 73 73 $instance['orderby'] = strip_tags( $new_instance['orderby'] ); 74 $instance['show_status'] = strip_tags( $new_instance['show_status'] );74 $instance['show_status'] = isset( $new_instance['show_status'] ) ? $new_instance['show_status'] : false; 75 75 76 76 // Filter to hook into -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-event-blocks.php
r2878271 r3043889 82 82 $instance['date_past'] = $new_instance['date_past']; 83 83 $instance['date_future'] = $new_instance['date_future']; 84 $instance['date_relative'] = $new_instance['date_relative'];84 $instance['date_relative'] = isset( $new_instance['date_relative'] ) ? $new_instance['date_relative'] : false; 85 85 $instance['day'] = $new_instance['day']; 86 86 $instance['number'] = intval( $new_instance['number'] ); 87 87 $instance['order'] = strip_tags( $new_instance['order'] ); 88 $instance['show_all_events_link'] = $new_instance['show_all_events_link'];88 $instance['show_all_events_link'] = isset( $new_instance['show_all_events_link'] ) ? $new_instance['show_all_events_link'] : false; 89 89 90 90 // Filter to hook into -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-event-calendar.php
r2878271 r3043889 76 76 $instance['date_past'] = $new_instance['date_past']; 77 77 $instance['date_future'] = $new_instance['date_future']; 78 $instance['date_relative'] = $new_instance['date_relative'];78 $instance['date_relative'] = isset( $new_instance['date_relative'] ) ? $new_instance['date_relative'] : false; 79 79 $instance['day'] = $new_instance['day']; 80 $instance['show_all_events_link'] = $new_instance['show_all_events_link'];80 $instance['show_all_events_link'] = isset( $new_instance['show_all_events_link'] ) ? $new_instance['show_all_events_link'] : false; 81 81 82 82 // Filter to hook into -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-event-list.php
r2878271 r3043889 84 84 $instance['date_past'] = $new_instance['date_past']; 85 85 $instance['date_future'] = $new_instance['date_future']; 86 $instance['date_relative'] = $new_instance['date_relative'];86 $instance['date_relative'] = isset( $new_instance['date_relative'] ) ? $new_instance['date_relative'] : false; 87 87 $instance['day'] = $new_instance['day']; 88 88 $instance['number'] = intval( $new_instance['number'] ); 89 $instance['columns'] = (array) $new_instance['columns'];89 $instance['columns'] = isset( $new_instance['columns'] ) ? (array) $new_instance['columns'] : array(); 90 90 $instance['order'] = strip_tags( $new_instance['order'] ); 91 $instance['show_all_events_link'] = $new_instance['show_all_events_link'];91 $instance['show_all_events_link'] = isset( $new_instance['show_all_events_link'] ) ? $new_instance['show_all_events_link'] : false; 92 92 93 93 // Filter to hook into -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-league-table.php
r2629324 r3043889 65 65 $instance['caption'] = strip_tags( $new_instance['caption'] ); 66 66 $instance['number'] = intval( $new_instance['number'] ); 67 $instance['columns'] = (array) $new_instance['columns'];68 $instance['show_team_logo'] = $new_instance['show_team_logo'];69 $instance['show_full_table_link'] = $new_instance['show_full_table_link'];67 $instance['columns'] = isset( $new_instance['columns'] ) ? (array) $new_instance['columns'] : array(); 68 $instance['show_team_logo'] = isset( $new_instance['show_team_logo'] ) ? $new_instance['show_team_logo'] : false; 69 $instance['show_full_table_link'] = isset( $new_instance['show_full_table_link'] ) ? $new_instance['show_full_table_link'] : false; 70 70 71 71 // Filter to hook into -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-player-gallery.php
r2629324 r3043889 71 71 $instance['caption'] = strip_tags( $new_instance['caption'] ); 72 72 $instance['number'] = intval( $new_instance['number'] ); 73 $instance['columns'] = i ntval( $new_instance['columns'] );74 $instance['orderby'] = strip_tags( $new_instance['orderby'] );75 $instance['order'] = strip_tags( $new_instance['order'] );76 $instance['show_all_players_link'] = $new_instance['show_all_players_link'];73 $instance['columns'] = isset( $new_instance['columns'] ) ? intval( $new_instance['columns'] ) : 2; 74 $instance['orderby'] = isset( $new_instance['orderby'] ) ? strip_tags( $new_instance['orderby'] ) : 'default'; 75 $instance['order'] = isset( $new_instance['order'] ) ? strip_tags( $new_instance['order'] ) : 'ASC'; 76 $instance['show_all_players_link'] = isset( $new_instance['show_all_players_link'] ) ? $new_instance['show_all_players_link'] : false; 77 77 78 78 // Filter to hook into -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-player-list.php
r2629324 r3043889 71 71 $instance['caption'] = strip_tags( $new_instance['caption'] ); 72 72 $instance['number'] = intval( $new_instance['number'] ); 73 $instance['columns'] = (array) $new_instance['columns'];74 $instance['orderby'] = strip_tags( $new_instance['orderby'] );75 $instance['order'] = strip_tags( $new_instance['order'] );76 $instance['show_all_players_link'] = $new_instance['show_all_players_link'];73 $instance['columns'] = isset( $new_instance['columns'] ) ? (array) $new_instance['columns'] : array(); 74 $instance['orderby'] = isset( $new_instance['orderby'] ) ? strip_tags( $new_instance['orderby'] ) : 'default'; 75 $instance['order'] = isset( $new_instance['order'] ) ? strip_tags( $new_instance['order'] ) : 'ASC'; 76 $instance['show_all_players_link'] = isset( $new_instance['show_all_players_link'] ) ? $new_instance['show_all_players_link'] : false; 77 77 78 78 // Filter to hook into -
sportspress/tags/2.7.18/includes/widgets/class-sp-widget-team-gallery.php
r2629324 r3043889 71 71 $instance['columns'] = intval( $new_instance['columns'] ); 72 72 $instance['orderby'] = strip_tags( $new_instance['orderby'] ); 73 $instance['show_all_teams_link'] = $new_instance['show_all_teams_link'];73 $instance['show_all_teams_link'] = isset( $new_instance['show_all_teams_link'] ) ? $new_instance['show_all_teams_link'] : false; 74 74 75 75 // Filter to hook into -
sportspress/tags/2.7.18/readme.txt
r3043887 r3043889 4 4 Donate link: http://tboy.co/donate 5 5 Requires at least: 3.8 6 Tested up to: 6.4 7 Stable tag: 2.7.1 76 Tested up to: 6.4.3 7 Stable tag: 2.7.18 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.18 = 244 * Tweak - Only get staff template if enabled. 245 * Tweak - Show visible option only when "Auto" mode is selected. 246 * Fix - "None" option disappeared from dropdowns. 247 * Fix - Minutes not shown when image used as icon. 248 * Fix - Deprecated urlencode() notice. 249 * Fix - Null parameter notice. 250 * Fix - Undefined array key warnings. 251 * Fix - Add user capability check and nonce check when updating permalinks. 242 252 243 253 = 2.7.17 = -
sportspress/tags/2.7.18/sportspress.php
r3043887 r3043889 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.1 76 * Version: 2.7.18 7 7 * Author: ThemeBoy 8 8 * Author URI: http://themeboy.com 9 9 * Requires at least: 3.8 10 * Tested up to: 6.4. 210 * Tested up to: 6.4.3 11 11 * 12 12 * Text Domain: sportspress … … 27 27 * 28 28 * @class SportsPress 29 * @version 2.7.1 729 * @version 2.7.18 30 30 */ 31 31 final class SportsPress { … … 34 34 * @var string 35 35 */ 36 public $version = '2.7.1 7';36 public $version = '2.7.18'; 37 37 38 38 /** -
sportspress/tags/2.7.18/templates/event-performance-table.php
r2629324 r3043889 5 5 * @author ThemeBoy 6 6 * @package SportsPress/Templates 7 * @version 2. 6.207 * @version 2.7.18 8 8 */ 9 9 … … 221 221 $icons = ''; 222 222 if ( $performance_id && has_post_thumbnail( $performance_id ) ) : 223 $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $performance_id ) ) ) . ' ', intval( $value ) ); 224 endif; 223 preg_match( '#\((.*?)\)#', $value, $match ); 224 if ( ! empty( $match ) && isset( $match[1] ) ) { 225 $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $performance_id ) ) ) . ' ' . $match[1] . ' ', intval( $value ) ); 226 } else { 227 $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $performance_id ) ) ) . ' ', intval( $value ) ); 228 } 229 endif; 230 225 231 $content .= apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value ); 226 232 endif; … … 323 329 </table> 324 330 <?php 325 if ( isset( $show_staff ) ) { 326 echo wp_kses_post( sp_get_template( 327 'event-staff.php', 328 array( 329 'id' => $id, 330 'index' => $index, 331 ) 332 ) ); 331 if ( isset( $show_staff ) && $show_staff ) { 332 $template_content = sp_get_template( 333 'event-staff.php', 334 array( 335 'id' => $id, 336 'index' => $index, 337 ) 338 ); 339 if ( $template_content !== null ) { 340 echo wp_kses_post( $template_content ); 341 } 333 342 } 334 343 ?> -
sportspress/tags/2.7.18/templates/event-venue.php
r2629324 r3043889 5 5 * @author ThemeBoy 6 6 * @package SportsPress/Templates 7 * @version 2.7.1 7 * @version 2.7.18 8 8 */ 9 9 … … 38 38 39 39 $address = sp_array_value( $meta, 'sp_address', null ); 40 $address = urlencode( $address ); 40 if ( !is_null( $address ) ) { 41 $address = urlencode( $address ); 42 } 41 43 ?> 42 44 <div class="sp-template sp-template-event-venue"> -
sportspress/tags/2.7.18/templates/venue-map.php
r2629324 r3043889 5 5 * @author ThemeBoy 6 6 * @package SportsPress/Templates 7 * @version 2.7 7 * @version 2.7.18 8 8 */ 9 9 … … 21 21 22 22 $address = sp_array_value( $meta, 'sp_address', null ); 23 $address = urlencode( $address ); 23 if ( !is_null( $address ) ) { 24 $address = urlencode( $address ); 25 } 24 26 $latitude = sp_array_value( $meta, 'sp_latitude', null ); 25 27 $longitude = sp_array_value( $meta, 'sp_longitude', null ); -
sportspress/trunk/changelog.txt
r3031980 r3043889 1 1 == SportsPress Changelog == 2 3 = 2.7.18 = 4 * Tweak - Only get staff template if enabled. 5 * Tweak - Show visible option only when "Auto" mode is selected. 6 * Fix - "None" option disappeared from dropdowns. 7 * Fix - Minutes not shown when image used as icon. 8 * Fix - Deprecated urlencode() notice. 9 * Fix - Null parameter notice. 10 * Fix - Undefined array key warnings. 11 * Fix - Add user capability check and nonce check when updating permalinks. 2 12 3 13 = 2.7.17 = -
sportspress/trunk/includes/admin/class-sp-admin-permalink-settings.php
r3031980 r3043889 6 6 * @category Admin 7 7 * @package SportsPress/Admin 8 * @version 2.7.1 78 * @version 2.7.18 9 9 */ 10 10 … … 85 85 public function settings() { 86 86 echo wp_kses_post( wpautop( __( 'These settings control the permalinks used for SportsPress. These settings only apply when <strong>not using "default" permalinks above</strong>.', 'sportspress' ) ) ); 87 wp_nonce_field( plugin_basename( __FILE__ ), 'sp_permalink_nonce' ); 87 88 } 88 89 … … 91 92 */ 92 93 public function settings_save() { 93 if ( ! is_admin() ) { 94 return; 95 } 94 if ( ! is_admin() ) : 95 wp_die(); 96 endif; 97 98 if ( ! is_user_logged_in() ) : 99 wp_die(); 100 endif; 101 102 if ( ! current_user_can( 'manage_sportspress' ) ) : 103 wp_die(); 104 endif; 96 105 97 106 if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['sportspress_event_slug'] ) ) : 107 if ( ! isset( $_POST['sp_permalink_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['sp_permalink_nonce'] ), plugin_basename( __FILE__ ) ) ) : 108 return; 109 endif; 110 98 111 foreach ( $this->slugs as $slug ) : 99 112 $key = 'sportspress_' . $slug[0] . '_slug'; -
sportspress/trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php
r2878271 r3043889 6 6 * @category Admin 7 7 * @package SportsPress/Admin/Meta_Boxes 8 * @version 2.7. 98 * @version 2.7.18 9 9 */ 10 10 … … 267 267 'key' => 'sp_equation', 268 268 'compare' => 'NOT IN', 269 'value' => null,269 'value' => '', 270 270 ), 271 271 ), -
sportspress/trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php
r2629324 r3043889 6 6 * @category Admin 7 7 * @package SportsPress/Admin/Meta_Boxes 8 * @version 2.7. 98 * @version 2.7.18 9 9 */ 10 10 -
sportspress/trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php
r2629324 r3043889 42 42 if ( '' === $format ) { 43 43 $format = 'number'; 44 }45 if ( '' === $visible ) {46 $visible = 1;47 44 } 48 45 ?> … … 117 114 </select> 118 115 </p> 119 <p>120 <strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong>121 <i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i>122 </p>123 <ul class="sp-visible-selector">124 <li>125 <label class="selectit">126 <input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>>127 <?php esc_attr_e( 'Yes', 'sportspress' ); ?>128 </label>129 </li>130 <li>131 <label class="selectit">132 <input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>>133 <?php esc_attr_e( 'No', 'sportspress' ); ?>134 </label>135 </li>136 </ul>137 116 <?php 117 if ( 'auto' === get_option( 'sportspress_player_columns', 'auto' ) ) { 118 $visible = get_post_meta( $post->ID, 'sp_visible', true ); 119 if ( '' === $visible ) { 120 $visible = 1; 121 } 122 ?> 123 <p> 124 <strong><?php esc_attr_e( 'Visible', 'sportspress' ); ?></strong> 125 <i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_attr_e( 'Display in player profile?', 'sportspress' ); ?>"></i> 126 </p> 127 <ul class="sp-visible-selector"> 128 <li> 129 <label class="selectit"> 130 <input name="sp_visible" id="sp_visible_yes" type="radio" value="1" <?php checked( $visible ); ?>> 131 <?php esc_attr_e( 'Yes', 'sportspress' ); ?> 132 </label> 133 </li> 134 <li> 135 <label class="selectit"> 136 <input name="sp_visible" id="sp_visible_no" type="radio" value="0" <?php checked( ! $visible ); ?>> 137 <?php esc_attr_e( 'No', 'sportspress' ); ?> 138 </label> 139 </li> 140 </ul> 141 <?php 142 } 143 144 do_action( 'sportspress_meta_box_statistic_details', $post ); 138 145 } 139 146 -
sportspress/trunk/includes/sp-core-functions.php
r3031980 r3043889 8 8 * @category Core 9 9 * @package SportsPress/Functions 10 * @version 2.7.1 710 * @version 2.7.18 11 11 */ 12 12 … … 847 847 'values' => 'slug', 848 848 'class' => null, 849 'property' => null,849 'property' => 'none', 850 850 'placeholder' => null, 851 851 'chosen' => false, … … 983 983 'values' => 'post_name', 984 984 'class' => null, 985 'property' => null,985 'property' => 'none', 986 986 'placeholder' => null, 987 987 'chosen' => false, -
sportspress/trunk/includes/widgets/class-sp-widget-countdown.php
r2629324 r3043889 66 66 $instance['caption'] = strip_tags( $new_instance['caption'] ); 67 67 $instance['id'] = intval( $new_instance['id'] ); 68 $instance['show_venue'] = i ntval( $new_instance['show_venue'] );69 $instance['show_league'] = i ntval( $new_instance['show_league'] );70 $instance['show_date'] = i ntval( $new_instance['show_date'] );71 $instance['show_excluded'] = i ntval( $new_instance['show_excluded'] );68 $instance['show_venue'] = isset( $new_instance['show_venue'] ) ? $new_instance['show_venue'] : false; 69 $instance['show_league'] = isset( $new_instance['show_league'] ) ? $new_instance['show_league'] : false; 70 $instance['show_date'] = isset( $new_instance['show_date'] ) ? $new_instance['show_date'] : false; 71 $instance['show_excluded'] = isset( $new_instance['show_excluded'] ) ? $new_instance['show_excluded'] : false; 72 72 $instance['order'] = strip_tags( $new_instance['order'] ); 73 73 $instance['orderby'] = strip_tags( $new_instance['orderby'] ); 74 $instance['show_status'] = strip_tags( $new_instance['show_status'] );74 $instance['show_status'] = isset( $new_instance['show_status'] ) ? $new_instance['show_status'] : false; 75 75 76 76 // Filter to hook into -
sportspress/trunk/includes/widgets/class-sp-widget-event-blocks.php
r2878271 r3043889 82 82 $instance['date_past'] = $new_instance['date_past']; 83 83 $instance['date_future'] = $new_instance['date_future']; 84 $instance['date_relative'] = $new_instance['date_relative'];84 $instance['date_relative'] = isset( $new_instance['date_relative'] ) ? $new_instance['date_relative'] : false; 85 85 $instance['day'] = $new_instance['day']; 86 86 $instance['number'] = intval( $new_instance['number'] ); 87 87 $instance['order'] = strip_tags( $new_instance['order'] ); 88 $instance['show_all_events_link'] = $new_instance['show_all_events_link'];88 $instance['show_all_events_link'] = isset( $new_instance['show_all_events_link'] ) ? $new_instance['show_all_events_link'] : false; 89 89 90 90 // Filter to hook into -
sportspress/trunk/includes/widgets/class-sp-widget-event-calendar.php
r2878271 r3043889 76 76 $instance['date_past'] = $new_instance['date_past']; 77 77 $instance['date_future'] = $new_instance['date_future']; 78 $instance['date_relative'] = $new_instance['date_relative'];78 $instance['date_relative'] = isset( $new_instance['date_relative'] ) ? $new_instance['date_relative'] : false; 79 79 $instance['day'] = $new_instance['day']; 80 $instance['show_all_events_link'] = $new_instance['show_all_events_link'];80 $instance['show_all_events_link'] = isset( $new_instance['show_all_events_link'] ) ? $new_instance['show_all_events_link'] : false; 81 81 82 82 // Filter to hook into -
sportspress/trunk/includes/widgets/class-sp-widget-event-list.php
r2878271 r3043889 84 84 $instance['date_past'] = $new_instance['date_past']; 85 85 $instance['date_future'] = $new_instance['date_future']; 86 $instance['date_relative'] = $new_instance['date_relative'];86 $instance['date_relative'] = isset( $new_instance['date_relative'] ) ? $new_instance['date_relative'] : false; 87 87 $instance['day'] = $new_instance['day']; 88 88 $instance['number'] = intval( $new_instance['number'] ); 89 $instance['columns'] = (array) $new_instance['columns'];89 $instance['columns'] = isset( $new_instance['columns'] ) ? (array) $new_instance['columns'] : array(); 90 90 $instance['order'] = strip_tags( $new_instance['order'] ); 91 $instance['show_all_events_link'] = $new_instance['show_all_events_link'];91 $instance['show_all_events_link'] = isset( $new_instance['show_all_events_link'] ) ? $new_instance['show_all_events_link'] : false; 92 92 93 93 // Filter to hook into -
sportspress/trunk/includes/widgets/class-sp-widget-league-table.php
r2629324 r3043889 65 65 $instance['caption'] = strip_tags( $new_instance['caption'] ); 66 66 $instance['number'] = intval( $new_instance['number'] ); 67 $instance['columns'] = (array) $new_instance['columns'];68 $instance['show_team_logo'] = $new_instance['show_team_logo'];69 $instance['show_full_table_link'] = $new_instance['show_full_table_link'];67 $instance['columns'] = isset( $new_instance['columns'] ) ? (array) $new_instance['columns'] : array(); 68 $instance['show_team_logo'] = isset( $new_instance['show_team_logo'] ) ? $new_instance['show_team_logo'] : false; 69 $instance['show_full_table_link'] = isset( $new_instance['show_full_table_link'] ) ? $new_instance['show_full_table_link'] : false; 70 70 71 71 // Filter to hook into -
sportspress/trunk/includes/widgets/class-sp-widget-player-gallery.php
r2629324 r3043889 71 71 $instance['caption'] = strip_tags( $new_instance['caption'] ); 72 72 $instance['number'] = intval( $new_instance['number'] ); 73 $instance['columns'] = i ntval( $new_instance['columns'] );74 $instance['orderby'] = strip_tags( $new_instance['orderby'] );75 $instance['order'] = strip_tags( $new_instance['order'] );76 $instance['show_all_players_link'] = $new_instance['show_all_players_link'];73 $instance['columns'] = isset( $new_instance['columns'] ) ? intval( $new_instance['columns'] ) : 2; 74 $instance['orderby'] = isset( $new_instance['orderby'] ) ? strip_tags( $new_instance['orderby'] ) : 'default'; 75 $instance['order'] = isset( $new_instance['order'] ) ? strip_tags( $new_instance['order'] ) : 'ASC'; 76 $instance['show_all_players_link'] = isset( $new_instance['show_all_players_link'] ) ? $new_instance['show_all_players_link'] : false; 77 77 78 78 // Filter to hook into -
sportspress/trunk/includes/widgets/class-sp-widget-player-list.php
r2629324 r3043889 71 71 $instance['caption'] = strip_tags( $new_instance['caption'] ); 72 72 $instance['number'] = intval( $new_instance['number'] ); 73 $instance['columns'] = (array) $new_instance['columns'];74 $instance['orderby'] = strip_tags( $new_instance['orderby'] );75 $instance['order'] = strip_tags( $new_instance['order'] );76 $instance['show_all_players_link'] = $new_instance['show_all_players_link'];73 $instance['columns'] = isset( $new_instance['columns'] ) ? (array) $new_instance['columns'] : array(); 74 $instance['orderby'] = isset( $new_instance['orderby'] ) ? strip_tags( $new_instance['orderby'] ) : 'default'; 75 $instance['order'] = isset( $new_instance['order'] ) ? strip_tags( $new_instance['order'] ) : 'ASC'; 76 $instance['show_all_players_link'] = isset( $new_instance['show_all_players_link'] ) ? $new_instance['show_all_players_link'] : false; 77 77 78 78 // Filter to hook into -
sportspress/trunk/includes/widgets/class-sp-widget-team-gallery.php
r2629324 r3043889 71 71 $instance['columns'] = intval( $new_instance['columns'] ); 72 72 $instance['orderby'] = strip_tags( $new_instance['orderby'] ); 73 $instance['show_all_teams_link'] = $new_instance['show_all_teams_link'];73 $instance['show_all_teams_link'] = isset( $new_instance['show_all_teams_link'] ) ? $new_instance['show_all_teams_link'] : false; 74 74 75 75 // Filter to hook into -
sportspress/trunk/readme.txt
r3031980 r3043889 4 4 Donate link: http://tboy.co/donate 5 5 Requires at least: 3.8 6 Tested up to: 6.4 7 Stable tag: 2.7.1 76 Tested up to: 6.4.3 7 Stable tag: 2.7.18 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.18 = 244 * Tweak - Only get staff template if enabled. 245 * Tweak - Show visible option only when "Auto" mode is selected. 246 * Fix - "None" option disappeared from dropdowns. 247 * Fix - Minutes not shown when image used as icon. 248 * Fix - Deprecated urlencode() notice. 249 * Fix - Null parameter notice. 250 * Fix - Undefined array key warnings. 251 * Fix - Add user capability check and nonce check when updating permalinks. 242 252 243 253 = 2.7.17 = -
sportspress/trunk/sportspress.php
r3031980 r3043889 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.1 76 * Version: 2.7.18 7 7 * Author: ThemeBoy 8 8 * Author URI: http://themeboy.com 9 9 * Requires at least: 3.8 10 * Tested up to: 6.4. 210 * Tested up to: 6.4.3 11 11 * 12 12 * Text Domain: sportspress … … 27 27 * 28 28 * @class SportsPress 29 * @version 2.7.1 729 * @version 2.7.18 30 30 */ 31 31 final class SportsPress { … … 34 34 * @var string 35 35 */ 36 public $version = '2.7.1 7';36 public $version = '2.7.18'; 37 37 38 38 /** -
sportspress/trunk/templates/event-performance-table.php
r2629324 r3043889 5 5 * @author ThemeBoy 6 6 * @package SportsPress/Templates 7 * @version 2. 6.207 * @version 2.7.18 8 8 */ 9 9 … … 221 221 $icons = ''; 222 222 if ( $performance_id && has_post_thumbnail( $performance_id ) ) : 223 $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $performance_id ) ) ) . ' ', intval( $value ) ); 224 endif; 223 preg_match( '#\((.*?)\)#', $value, $match ); 224 if ( ! empty( $match ) && isset( $match[1] ) ) { 225 $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $performance_id ) ) ) . ' ' . $match[1] . ' ', intval( $value ) ); 226 } else { 227 $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $performance_id ) ) ) . ' ', intval( $value ) ); 228 } 229 endif; 230 225 231 $content .= apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value ); 226 232 endif; … … 323 329 </table> 324 330 <?php 325 if ( isset( $show_staff ) ) { 326 echo wp_kses_post( sp_get_template( 327 'event-staff.php', 328 array( 329 'id' => $id, 330 'index' => $index, 331 ) 332 ) ); 331 if ( isset( $show_staff ) && $show_staff ) { 332 $template_content = sp_get_template( 333 'event-staff.php', 334 array( 335 'id' => $id, 336 'index' => $index, 337 ) 338 ); 339 if ( $template_content !== null ) { 340 echo wp_kses_post( $template_content ); 341 } 333 342 } 334 343 ?> -
sportspress/trunk/templates/event-venue.php
r2629324 r3043889 5 5 * @author ThemeBoy 6 6 * @package SportsPress/Templates 7 * @version 2.7.1 7 * @version 2.7.18 8 8 */ 9 9 … … 38 38 39 39 $address = sp_array_value( $meta, 'sp_address', null ); 40 $address = urlencode( $address ); 40 if ( !is_null( $address ) ) { 41 $address = urlencode( $address ); 42 } 41 43 ?> 42 44 <div class="sp-template sp-template-event-venue"> -
sportspress/trunk/templates/venue-map.php
r2629324 r3043889 5 5 * @author ThemeBoy 6 6 * @package SportsPress/Templates 7 * @version 2.7 7 * @version 2.7.18 8 8 */ 9 9 … … 21 21 22 22 $address = sp_array_value( $meta, 'sp_address', null ); 23 $address = urlencode( $address ); 23 if ( !is_null( $address ) ) { 24 $address = urlencode( $address ); 25 } 24 26 $latitude = sp_array_value( $meta, 'sp_latitude', null ); 25 27 $longitude = sp_array_value( $meta, 'sp_longitude', null );
Note: See TracChangeset
for help on using the changeset viewer.