diff --git a/includes/admin/settings/class-sp-settings-events.php b/includes/admin/settings/class-sp-settings-events.php index 287dc65e..5567ddb9 100644 --- a/includes/admin/settings/class-sp-settings-events.php +++ b/includes/admin/settings/class-sp-settings-events.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin - * @version 1.1 + * @version 1.3 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -40,6 +40,23 @@ class SP_Settings_Events extends SP_Settings_Page { return apply_filters( 'sportspress_event_settings', array( array( 'title' => __( 'Event Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'event_options' ), + + array( + 'title' => __( 'Link', 'sportspress' ), + 'desc' => __( 'Link events', 'sportspress' ), + 'id' => 'sportspress_link_events', + 'default' => 'yes', + 'type' => 'checkbox', + 'checkboxgroup' => 'start', + ), + + array( + 'desc' => __( 'Link venues', 'sportspress' ), + 'id' => 'sportspress_link_venues', + 'default' => 'no', + 'type' => 'checkbox', + 'checkboxgroup' => 'end', + ), array( 'title' => __( 'Limit', 'sportspress' ), @@ -73,14 +90,6 @@ class SP_Settings_Events extends SP_Settings_Page { 'checkboxgroup' => 'start', ), - array( - 'desc' => __( 'Link venues', 'sportspress' ), - 'id' => 'sportspress_event_link_venues', - 'default' => 'no', - 'type' => 'checkbox', - 'checkboxgroup' => 'end', - ), - array( 'title' => __( 'Player Performance', 'sportspress' ), 'desc' => __( 'Display players', 'sportspress' ), @@ -90,14 +99,6 @@ class SP_Settings_Events extends SP_Settings_Page { 'checkboxgroup' => 'start', ), - array( - 'desc' => __( 'Link players', 'sportspress' ), - 'id' => 'sportspress_event_link_players', - 'default' => 'yes', - 'type' => 'checkbox', - 'checkboxgroup' => '', - ), - array( 'desc' => __( 'Display total', 'sportspress' ), 'id' => 'sportspress_event_show_total', @@ -115,34 +116,10 @@ class SP_Settings_Events extends SP_Settings_Page { 'checkboxgroup' => 'start', ), - array( - 'desc' => __( 'Link staff', 'sportspress' ), - 'id' => 'sportspress_event_link_staff', - 'default' => 'yes', - 'type' => 'checkbox', - 'checkboxgroup' => 'end', - ), - array( 'type' => 'sectionend', 'id' => 'event_options' ), array( 'title' => __( 'Calendars', 'sportspress' ), 'type' => 'title', 'id' => 'calendar_options' ), - array( - 'title' => __( 'Teams', 'sportspress' ), - 'desc' => __( 'Link teams', 'sportspress' ), - 'id' => 'sportspress_calendar_link_teams', - 'default' => 'no', - 'type' => 'checkbox', - ), - - array( - 'title' => __( 'Venues', 'sportspress' ), - 'desc' => __( 'Link venues', 'sportspress' ), - 'id' => 'sportspress_calendar_link_venues', - 'default' => 'yes', - 'type' => 'checkbox', - ), - array( 'title' => __( 'Pagination', 'sportspress' ), 'desc' => __( 'Paginate', 'sportspress' ), diff --git a/includes/admin/settings/class-sp-settings-players.php b/includes/admin/settings/class-sp-settings-players.php index 897251db..585a4277 100644 --- a/includes/admin/settings/class-sp-settings-players.php +++ b/includes/admin/settings/class-sp-settings-players.php @@ -38,6 +38,14 @@ class SP_Settings_Players extends SP_Settings_Page { $settings = array( array( 'title' => __( 'Player Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'player_options' ), + array( + 'title' => __( 'Link', 'sportspress' ), + 'desc' => __( 'Link players', 'sportspress' ), + 'id' => 'sportspress_link_players', + 'default' => 'yes', + 'type' => 'checkbox', + ), + array( 'title' => __( 'Nationality', 'sportspress' ), 'desc' => __( 'Display national flags', 'sportspress' ), @@ -50,22 +58,6 @@ class SP_Settings_Players extends SP_Settings_Page { array( 'title' => __( 'Player Lists', 'sportspress' ), 'type' => 'title', 'id' => 'list_options' ), - array( - 'title' => __( 'Players', 'sportspress' ), - 'desc' => __( 'Link players', 'sportspress' ), - 'id' => 'sportspress_list_link_players', - 'default' => 'yes', - 'type' => 'checkbox', - ), - - array( - 'title' => __( 'Teams', 'sportspress' ), - 'desc' => __( 'Link teams', 'sportspress' ), - 'id' => 'sportspress_list_link_teams', - 'default' => 'no', - 'type' => 'checkbox', - ), - array( 'title' => __( 'Pagination', 'sportspress' ), 'desc' => __( 'Paginate', 'sportspress' ), diff --git a/includes/admin/settings/class-sp-settings-staff.php b/includes/admin/settings/class-sp-settings-staff.php index 07a980d4..195cf5ee 100644 --- a/includes/admin/settings/class-sp-settings-staff.php +++ b/includes/admin/settings/class-sp-settings-staff.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin - * @version 1.1 + * @version 1.3 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -40,6 +40,14 @@ class SP_Settings_Staff extends SP_Settings_Page { array( 'title' => __( 'Staff Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'staff_options' ), + array( + 'title' => __( 'Link', 'sportspress' ), + 'desc' => __( 'Link staff', 'sportspress' ), + 'id' => 'sportspress_link_staff', + 'default' => 'yes', + 'type' => 'checkbox', + ), + array( 'title' => __( 'Nationality', 'sportspress' ), 'desc' => __( 'Display national flags', 'sportspress' ), diff --git a/includes/admin/settings/class-sp-settings-teams.php b/includes/admin/settings/class-sp-settings-teams.php index a7325a85..e1f13338 100644 --- a/includes/admin/settings/class-sp-settings-teams.php +++ b/includes/admin/settings/class-sp-settings-teams.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin - * @version 0.8 + * @version 1.3 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -40,6 +40,14 @@ class SP_Settings_Teams extends SP_Settings_Page { array( 'title' => __( 'Team Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'team_options' ), + array( + 'title' => __( 'Link', 'sportspress' ), + 'desc' => __( 'Link teams', 'sportspress' ), + 'id' => 'sportspress_link_teams', + 'default' => 'no', + 'type' => 'checkbox', + ), + array( 'type' => 'sectionend', 'id' => 'team_options' ), array( 'title' => __( 'League Tables', 'sportspress' ), 'type' => 'title', 'id' => 'table_options' ), @@ -50,15 +58,6 @@ class SP_Settings_Teams extends SP_Settings_Page { 'id' => 'sportspress_table_show_logos', 'default' => 'yes', 'type' => 'checkbox', - 'checkboxgroup' => 'start', - ), - - array( - 'desc' => __( 'Link teams', 'sportspress' ), - 'id' => 'sportspress_table_link_teams', - 'default' => 'no', - 'type' => 'checkbox', - 'checkboxgroup' => 'end', ), array( diff --git a/includes/class-sp-player.php b/includes/class-sp-player.php index a4d0bfbb..8ccc7951 100644 --- a/includes/class-sp-player.php +++ b/includes/class-sp-player.php @@ -280,7 +280,7 @@ class SP_Player extends SP_Custom_Post { $team_name = get_the_title( $team_id ); - if ( get_option( 'sportspress_player_link_teams', 'no' ) == 'yes' ? true : false ): + if ( get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false ): $team_permalink = get_permalink( $team_id ); $team_name = '' . $team_name . ''; endif; diff --git a/templates/event-blocks.php b/templates/event-blocks.php index f2a20fa5..efd462a1 100644 --- a/templates/event-blocks.php +++ b/templates/event-blocks.php @@ -15,7 +15,7 @@ $defaults = array( 'status' => 'default', 'date' => 'default', 'number' => -1, - 'link_teams' => get_option( 'sportspress_calendar_link_teams', 'no' ) == 'yes' ? true : false, + 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'paginated' => get_option( 'sportspress_calendar_paginated', 'yes' ) == 'yes' ? true : false, 'rows' => get_option( 'sportspress_calendar_rows', 10 ), 'order' => 'default', diff --git a/templates/event-list.php b/templates/event-list.php index f446d4a7..56012c34 100644 --- a/templates/event-list.php +++ b/templates/event-list.php @@ -16,8 +16,8 @@ $defaults = array( 'status' => 'default', 'date' => 'default', 'number' => -1, - 'link_teams' => get_option( 'sportspress_calendar_link_teams', 'no' ) == 'yes' ? true : false, - 'link_venues' => get_option( 'sportspress_calendar_link_venues', 'yes' ) == 'yes' ? true : false, + 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, + 'link_venues' => get_option( 'sportspress_link_venues', 'yes' ) == 'yes' ? true : false, 'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false, 'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false, 'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false, diff --git a/templates/event-performance.php b/templates/event-performance.php index 3957fbfd..3417ab0b 100644 --- a/templates/event-performance.php +++ b/templates/event-performance.php @@ -27,7 +27,7 @@ $teams = get_post_meta( $id, 'sp_team', false ); $status = $event->status(); $show_players = get_option( 'sportspress_event_show_players', 'yes' ) == 'yes' ? true : false; -$link_posts = get_option( 'sportspress_event_link_players', 'yes' ) == 'yes' ? true : false; +$link_posts = get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false; $sortable = get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false; $scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false; $responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false; diff --git a/templates/event-staff.php b/templates/event-staff.php index 4a1e285f..6652fcdf 100644 --- a/templates/event-staff.php +++ b/templates/event-staff.php @@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly $defaults = array( 'id' => get_the_ID(), 'index' => 0, - 'link_posts' => get_option( 'sportspress_event_link_staff', 'yes' ) == 'yes' ? true : false, + 'link_posts' => get_option( 'sportspress_link_staff', 'yes' ) == 'yes' ? true : false, ); $staff = array_filter( sp_array_between( (array)get_post_meta( $id, 'sp_staff', false ), 0, $index ) ); diff --git a/templates/event-venue.php b/templates/event-venue.php index f76eb37a..2033462e 100644 --- a/templates/event-venue.php +++ b/templates/event-venue.php @@ -18,7 +18,7 @@ if ( ! $venues ) return; $show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false; -$link_venues = get_option( 'sportspress_event_link_venues', 'no' ) == 'yes' ? true : false; +$link_venues = get_option( 'sportspress_link_venues', 'no' ) == 'yes' ? true : false; foreach( $venues as $venue ): $t_id = $venue->term_id; diff --git a/templates/league-table.php b/templates/league-table.php index 9ad8e7a4..b51199f3 100644 --- a/templates/league-table.php +++ b/templates/league-table.php @@ -15,7 +15,7 @@ $defaults = array( 'columns' => null, 'show_full_table_link' => false, 'show_team_logo' => get_option( 'sportspress_table_show_logos', 'yes' ) == 'yes' ? true : false, - 'link_posts' => get_option( 'sportspress_table_link_teams', 'no' ) == 'yes' ? true : false, + 'link_posts' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false, 'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false, 'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false, diff --git a/templates/player-gallery-thumbnail.php b/templates/player-gallery-thumbnail.php index badf6a81..c2447a66 100644 --- a/templates/player-gallery-thumbnail.php +++ b/templates/player-gallery-thumbnail.php @@ -16,7 +16,7 @@ $defaults = array( 'captiontag' => 'dd', 'caption' => null, 'size' => 'thumbnail', - 'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false, + 'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false, ); extract( $defaults, EXTR_SKIP ); diff --git a/templates/player-gallery.php b/templates/player-gallery.php index 67e807bb..d839c089 100644 --- a/templates/player-gallery.php +++ b/templates/player-gallery.php @@ -22,7 +22,7 @@ $defaults = array( 'columns' => 3, 'size' => 'thumbnail', 'show_all_players_link' => false, - 'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false, + 'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false, ); extract( $defaults, EXTR_SKIP ); diff --git a/templates/player-list.php b/templates/player-list.php index b5e7b9b5..8a2e8e27 100644 --- a/templates/player-list.php +++ b/templates/player-list.php @@ -18,8 +18,8 @@ $defaults = array( 'orderby' => 'default', 'order' => 'ASC', 'show_all_players_link' => false, - 'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false, - 'link_teams' => get_option( 'sportspress_list_link_teams', 'no' ) == 'yes' ? true : false, + 'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false, + 'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false, 'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false, 'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false, 'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,