Plugin Directory

Changeset 3043889


Ignore:
Timestamp:
03/02/2024 05:59:41 AM (23 months ago)
Author:
ThemeBoy
Message:

tagging version 2.7.18

Location:
sportspress
Files:
1 added
35 edited
17 copied

Legend:

Unmodified
Added
Removed
  • sportspress/tags/2.7.18/changelog.txt

    r3043887 r3043889  
    11== 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.
    212
    313= 2.7.17 =
  • sportspress/tags/2.7.18/includes/admin/class-sp-admin-permalink-settings.php

    r3031980 r3043889  
    66 * @category    Admin
    77 * @package     SportsPress/Admin
    8  * @version     2.7.17
     8 * @version     2.7.18
    99 */
    1010
     
    8585        public function settings() {
    8686            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' );
    8788        }
    8889
     
    9192         */
    9293        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;
    96105
    97106            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
    98111                foreach ( $this->slugs as $slug ) :
    99112                    $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  
    66 * @category    Admin
    77 * @package     SportsPress/Admin/Meta_Boxes
    8  * @version     2.7.9
     8 * @version     2.7.18
    99 */
    1010
     
    267267                    'key'     => 'sp_equation',
    268268                    'compare' => 'NOT IN',
    269                     'value'   => null,
     269                    'value'   => '',
    270270                ),
    271271            ),
  • sportspress/tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php

    r2629324 r3043889  
    66 * @category    Admin
    77 * @package     SportsPress/Admin/Meta_Boxes
    8  * @version     2.7.9
     8 * @version     2.7.18
    99 */
    1010
  • sportspress/tags/2.7.18/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php

    r2629324 r3043889  
    4242        if ( '' === $format ) {
    4343            $format = 'number';
    44         }
    45         if ( '' === $visible ) {
    46             $visible = 1;
    4744        }
    4845        ?>
     
    117114            </select>
    118115        </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>
    137116        <?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 );
    138145    }
    139146
  • sportspress/tags/2.7.18/includes/sp-core-functions.php

    r3031980 r3043889  
    88 * @category    Core
    99 * @package     SportsPress/Functions
    10  * @version   2.7.17
     10 * @version   2.7.18
    1111 */
    1212
     
    847847            'values'            => 'slug',
    848848            'class'             => null,
    849             'property'          => null,
     849            'property'          => 'none',
    850850            'placeholder'       => null,
    851851            'chosen'            => false,
     
    983983            'values'            => 'post_name',
    984984            'class'             => null,
    985             'property'          => null,
     985            'property'          => 'none',
    986986            'placeholder'       => null,
    987987            'chosen'            => false,
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-countdown.php

    r2629324 r3043889  
    6666        $instance['caption']       = strip_tags( $new_instance['caption'] );
    6767        $instance['id']            = intval( $new_instance['id'] );
    68         $instance['show_venue']    = intval( $new_instance['show_venue'] );
    69         $instance['show_league']   = intval( $new_instance['show_league'] );
    70         $instance['show_date']     = intval( $new_instance['show_date'] );
    71         $instance['show_excluded'] = intval( $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;
    7272        $instance['order']         = strip_tags( $new_instance['order'] );
    7373        $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;
    7575
    7676        // Filter to hook into
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-event-blocks.php

    r2878271 r3043889  
    8282        $instance['date_past']            = $new_instance['date_past'];
    8383        $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;
    8585        $instance['day']                  = $new_instance['day'];
    8686        $instance['number']               = intval( $new_instance['number'] );
    8787        $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;
    8989
    9090        // Filter to hook into
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-event-calendar.php

    r2878271 r3043889  
    7676        $instance['date_past']            = $new_instance['date_past'];
    7777        $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;
    7979        $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;
    8181
    8282        // Filter to hook into
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-event-list.php

    r2878271 r3043889  
    8484        $instance['date_past']            = $new_instance['date_past'];
    8585        $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;
    8787        $instance['day']                  = $new_instance['day'];
    8888        $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();
    9090        $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;
    9292
    9393        // Filter to hook into
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-league-table.php

    r2629324 r3043889  
    6565        $instance['caption']              = strip_tags( $new_instance['caption'] );
    6666        $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;
    7070
    7171        // Filter to hook into
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-player-gallery.php

    r2629324 r3043889  
    7171        $instance['caption']               = strip_tags( $new_instance['caption'] );
    7272        $instance['number']                = intval( $new_instance['number'] );
    73         $instance['columns']               = intval( $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;
    7777
    7878        // Filter to hook into
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-player-list.php

    r2629324 r3043889  
    7171        $instance['caption']               = strip_tags( $new_instance['caption'] );
    7272        $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;
    7777
    7878        // Filter to hook into
  • sportspress/tags/2.7.18/includes/widgets/class-sp-widget-team-gallery.php

    r2629324 r3043889  
    7171        $instance['columns']             = intval( $new_instance['columns'] );
    7272        $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;
    7474
    7575        // Filter to hook into
  • sportspress/tags/2.7.18/readme.txt

    r3043887 r3043889  
    44Donate link: http://tboy.co/donate
    55Requires at least: 3.8
    6 Tested up to: 6.4
    7 Stable tag: 2.7.17
     6Tested up to: 6.4.3
     7Stable tag: 2.7.18
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    240240
    241241== 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.
    242252
    243253= 2.7.17 =
  • sportspress/tags/2.7.18/sportspress.php

    r3043887 r3043889  
    44 * Plugin URI: http://themeboy.com/sportspress/
    55 * Description: Manage your club and its players, staff, events, league tables, and player lists.
    6  * Version: 2.7.17
     6 * Version: 2.7.18
    77 * Author: ThemeBoy
    88 * Author URI: http://themeboy.com
    99 * Requires at least: 3.8
    10  * Tested up to: 6.4.2
     10 * Tested up to: 6.4.3
    1111 *
    1212 * Text Domain: sportspress
     
    2727     *
    2828     * @class SportsPress
    29      * @version 2.7.17
     29     * @version 2.7.18
    3030     */
    3131    final class SportsPress {
     
    3434         * @var string
    3535         */
    36         public $version = '2.7.17';
     36        public $version = '2.7.18';
    3737
    3838        /**
  • sportspress/tags/2.7.18/templates/event-performance-table.php

    r2629324 r3043889  
    55 * @author      ThemeBoy
    66 * @package     SportsPress/Templates
    7  * @version     2.6.20
     7 * @version     2.7.18
    88 */
    99
     
    221221                                $icons          = '';
    222222                                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                               
    225231                                $content .= apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value );
    226232                            endif;
     
    323329        </table>
    324330        <?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            }
    333342        }
    334343        ?>
  • sportspress/tags/2.7.18/templates/event-venue.php

    r2629324 r3043889  
    55 * @author      ThemeBoy
    66 * @package     SportsPress/Templates
    7  * @version     2.7.1
     7 * @version     2.7.18
    88 */
    99
     
    3838
    3939    $address = sp_array_value( $meta, 'sp_address', null );
    40     $address = urlencode( $address );
     40    if ( !is_null( $address ) ) {
     41        $address = urlencode( $address );
     42    }
    4143    ?>
    4244    <div class="sp-template sp-template-event-venue">
  • sportspress/tags/2.7.18/templates/venue-map.php

    r2629324 r3043889  
    55 * @author      ThemeBoy
    66 * @package     SportsPress/Templates
    7  * @version     2.7
     7 * @version     2.7.18
    88 */
    99
     
    2121
    2222$address   = sp_array_value( $meta, 'sp_address', null );
    23 $address   = urlencode( $address );
     23if ( !is_null( $address ) ) {
     24    $address = urlencode( $address );
     25}
    2426$latitude  = sp_array_value( $meta, 'sp_latitude', null );
    2527$longitude = sp_array_value( $meta, 'sp_longitude', null );
  • sportspress/trunk/changelog.txt

    r3031980 r3043889  
    11== 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.
    212
    313= 2.7.17 =
  • sportspress/trunk/includes/admin/class-sp-admin-permalink-settings.php

    r3031980 r3043889  
    66 * @category    Admin
    77 * @package     SportsPress/Admin
    8  * @version     2.7.17
     8 * @version     2.7.18
    99 */
    1010
     
    8585        public function settings() {
    8686            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' );
    8788        }
    8889
     
    9192         */
    9293        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;
    96105
    97106            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
    98111                foreach ( $this->slugs as $slug ) :
    99112                    $key   = 'sportspress_' . $slug[0] . '_slug';
  • sportspress/trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php

    r2878271 r3043889  
    66 * @category    Admin
    77 * @package     SportsPress/Admin/Meta_Boxes
    8  * @version     2.7.9
     8 * @version     2.7.18
    99 */
    1010
     
    267267                    'key'     => 'sp_equation',
    268268                    'compare' => 'NOT IN',
    269                     'value'   => null,
     269                    'value'   => '',
    270270                ),
    271271            ),
  • sportspress/trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php

    r2629324 r3043889  
    66 * @category    Admin
    77 * @package     SportsPress/Admin/Meta_Boxes
    8  * @version     2.7.9
     8 * @version     2.7.18
    99 */
    1010
  • sportspress/trunk/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php

    r2629324 r3043889  
    4242        if ( '' === $format ) {
    4343            $format = 'number';
    44         }
    45         if ( '' === $visible ) {
    46             $visible = 1;
    4744        }
    4845        ?>
     
    117114            </select>
    118115        </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>
    137116        <?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 );
    138145    }
    139146
  • sportspress/trunk/includes/sp-core-functions.php

    r3031980 r3043889  
    88 * @category    Core
    99 * @package     SportsPress/Functions
    10  * @version   2.7.17
     10 * @version   2.7.18
    1111 */
    1212
     
    847847            'values'            => 'slug',
    848848            'class'             => null,
    849             'property'          => null,
     849            'property'          => 'none',
    850850            'placeholder'       => null,
    851851            'chosen'            => false,
     
    983983            'values'            => 'post_name',
    984984            'class'             => null,
    985             'property'          => null,
     985            'property'          => 'none',
    986986            'placeholder'       => null,
    987987            'chosen'            => false,
  • sportspress/trunk/includes/widgets/class-sp-widget-countdown.php

    r2629324 r3043889  
    6666        $instance['caption']       = strip_tags( $new_instance['caption'] );
    6767        $instance['id']            = intval( $new_instance['id'] );
    68         $instance['show_venue']    = intval( $new_instance['show_venue'] );
    69         $instance['show_league']   = intval( $new_instance['show_league'] );
    70         $instance['show_date']     = intval( $new_instance['show_date'] );
    71         $instance['show_excluded'] = intval( $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;
    7272        $instance['order']         = strip_tags( $new_instance['order'] );
    7373        $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;
    7575
    7676        // Filter to hook into
  • sportspress/trunk/includes/widgets/class-sp-widget-event-blocks.php

    r2878271 r3043889  
    8282        $instance['date_past']            = $new_instance['date_past'];
    8383        $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;
    8585        $instance['day']                  = $new_instance['day'];
    8686        $instance['number']               = intval( $new_instance['number'] );
    8787        $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;
    8989
    9090        // Filter to hook into
  • sportspress/trunk/includes/widgets/class-sp-widget-event-calendar.php

    r2878271 r3043889  
    7676        $instance['date_past']            = $new_instance['date_past'];
    7777        $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;
    7979        $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;
    8181
    8282        // Filter to hook into
  • sportspress/trunk/includes/widgets/class-sp-widget-event-list.php

    r2878271 r3043889  
    8484        $instance['date_past']            = $new_instance['date_past'];
    8585        $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;
    8787        $instance['day']                  = $new_instance['day'];
    8888        $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();
    9090        $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;
    9292
    9393        // Filter to hook into
  • sportspress/trunk/includes/widgets/class-sp-widget-league-table.php

    r2629324 r3043889  
    6565        $instance['caption']              = strip_tags( $new_instance['caption'] );
    6666        $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;
    7070
    7171        // Filter to hook into
  • sportspress/trunk/includes/widgets/class-sp-widget-player-gallery.php

    r2629324 r3043889  
    7171        $instance['caption']               = strip_tags( $new_instance['caption'] );
    7272        $instance['number']                = intval( $new_instance['number'] );
    73         $instance['columns']               = intval( $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;
    7777
    7878        // Filter to hook into
  • sportspress/trunk/includes/widgets/class-sp-widget-player-list.php

    r2629324 r3043889  
    7171        $instance['caption']               = strip_tags( $new_instance['caption'] );
    7272        $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;
    7777
    7878        // Filter to hook into
  • sportspress/trunk/includes/widgets/class-sp-widget-team-gallery.php

    r2629324 r3043889  
    7171        $instance['columns']             = intval( $new_instance['columns'] );
    7272        $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;
    7474
    7575        // Filter to hook into
  • sportspress/trunk/readme.txt

    r3031980 r3043889  
    44Donate link: http://tboy.co/donate
    55Requires at least: 3.8
    6 Tested up to: 6.4
    7 Stable tag: 2.7.17
     6Tested up to: 6.4.3
     7Stable tag: 2.7.18
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    240240
    241241== 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.
    242252
    243253= 2.7.17 =
  • sportspress/trunk/sportspress.php

    r3031980 r3043889  
    44 * Plugin URI: http://themeboy.com/sportspress/
    55 * Description: Manage your club and its players, staff, events, league tables, and player lists.
    6  * Version: 2.7.17
     6 * Version: 2.7.18
    77 * Author: ThemeBoy
    88 * Author URI: http://themeboy.com
    99 * Requires at least: 3.8
    10  * Tested up to: 6.4.2
     10 * Tested up to: 6.4.3
    1111 *
    1212 * Text Domain: sportspress
     
    2727     *
    2828     * @class SportsPress
    29      * @version 2.7.17
     29     * @version 2.7.18
    3030     */
    3131    final class SportsPress {
     
    3434         * @var string
    3535         */
    36         public $version = '2.7.17';
     36        public $version = '2.7.18';
    3737
    3838        /**
  • sportspress/trunk/templates/event-performance-table.php

    r2629324 r3043889  
    55 * @author      ThemeBoy
    66 * @package     SportsPress/Templates
    7  * @version     2.6.20
     7 * @version     2.7.18
    88 */
    99
     
    221221                                $icons          = '';
    222222                                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                               
    225231                                $content .= apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value );
    226232                            endif;
     
    323329        </table>
    324330        <?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            }
    333342        }
    334343        ?>
  • sportspress/trunk/templates/event-venue.php

    r2629324 r3043889  
    55 * @author      ThemeBoy
    66 * @package     SportsPress/Templates
    7  * @version     2.7.1
     7 * @version     2.7.18
    88 */
    99
     
    3838
    3939    $address = sp_array_value( $meta, 'sp_address', null );
    40     $address = urlencode( $address );
     40    if ( !is_null( $address ) ) {
     41        $address = urlencode( $address );
     42    }
    4143    ?>
    4244    <div class="sp-template sp-template-event-venue">
  • sportspress/trunk/templates/venue-map.php

    r2629324 r3043889  
    55 * @author      ThemeBoy
    66 * @package     SportsPress/Templates
    7  * @version     2.7
     7 * @version     2.7.18
    88 */
    99
     
    2121
    2222$address   = sp_array_value( $meta, 'sp_address', null );
    23 $address   = urlencode( $address );
     23if ( !is_null( $address ) ) {
     24    $address = urlencode( $address );
     25}
    2426$latitude  = sp_array_value( $meta, 'sp_latitude', null );
    2527$longitude = sp_array_value( $meta, 'sp_longitude', null );
Note: See TracChangeset for help on using the changeset viewer.