Remove mode setting and unused thumbnail sizes
This commit is contained in:
@@ -59,11 +59,6 @@ class SP_Admin_Assets {
|
||||
wp_enqueue_style( 'sportspress-admin-equation-styles', SP()->plugin_url() . '/assets/css/equation.css', array(), SP_VERSION );
|
||||
}
|
||||
|
||||
if ( SP()->mode == 'player' ):
|
||||
$custom_css = '#adminmenu #menu-posts-sp_team .menu-icon-sp_team div.wp-menu-image:before,.sp-icon-shield:before{content: "\f307"}';
|
||||
wp_add_inline_style( 'sportspress-admin-menu-styles', $custom_css );
|
||||
endif;
|
||||
|
||||
do_action( 'sportspress_admin_css' );
|
||||
}
|
||||
|
||||
|
||||
@@ -34,11 +34,8 @@ class SP_Admin_Settings {
|
||||
$settings[] = include( 'settings/class-sp-settings-general.php' );
|
||||
$settings[] = include( 'settings/class-sp-settings-events.php' );
|
||||
$settings[] = include( 'settings/class-sp-settings-teams.php' );
|
||||
|
||||
if ( SP()->mode == 'team' ):
|
||||
$settings[] = include( 'settings/class-sp-settings-players.php' );
|
||||
$settings[] = include( 'settings/class-sp-settings-staff.php' );
|
||||
endif;
|
||||
$settings[] = include( 'settings/class-sp-settings-players.php' );
|
||||
$settings[] = include( 'settings/class-sp-settings-staff.php' );
|
||||
|
||||
$settings = apply_filters( 'sportspress_get_settings_pages', $settings );
|
||||
|
||||
|
||||
@@ -181,10 +181,6 @@ class SP_Admin_Welcome {
|
||||
// Save settings
|
||||
if ( isset( $_POST['timezone_string'] ) ):
|
||||
update_option( 'timezone_string', $_POST['timezone_string'] );
|
||||
endif;
|
||||
if ( isset( $_POST['sportspress_mode'] ) && ! empty( $_POST['sportspress_mode'] ) && get_option( 'sportspress_mode', null ) != $_POST['sportspress_mode'] ):
|
||||
$sport = $_POST['sportspress_mode'];
|
||||
update_option( 'sportspress_mode', $_POST['sportspress_mode'] );
|
||||
endif;
|
||||
if ( isset( $_POST['sportspress_sport'] ) && ! empty( $_POST['sportspress_sport'] ) && get_option( 'sportspress_sport', null ) != $_POST['sportspress_sport'] ):
|
||||
$sport = $_POST['sportspress_sport'];
|
||||
@@ -235,20 +231,6 @@ class SP_Admin_Welcome {
|
||||
));
|
||||
SP_Admin_Settings::output_fields( $settings );
|
||||
?>
|
||||
<h4><?php _e( 'Mode', 'sportspress' ); ?></h4>
|
||||
<?php
|
||||
$settings = array( array(
|
||||
'id' => 'sportspress_mode',
|
||||
'default' => 'team',
|
||||
'type' => 'select',
|
||||
'class' => $class,
|
||||
'options' => array(
|
||||
'team' => _x( 'Team', 'mode select', 'sportspress' ),
|
||||
'player' => _x( 'Individual', 'mode select', 'sportspress' ),
|
||||
),
|
||||
));
|
||||
SP_Admin_Settings::output_fields( $settings );
|
||||
?>
|
||||
<p class="submit sportspress-actions">
|
||||
<input name="save" class="button-primary" type="submit" value="<?php _e( 'Save changes', 'sportspress' ); ?>" />
|
||||
<input type="hidden" name="subtab" id="last_tab" />
|
||||
|
||||
@@ -52,7 +52,7 @@ class SP_Admin_Meta_Boxes {
|
||||
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Teams::save', 30, 2 );
|
||||
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Video::save', 40, 2 );
|
||||
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Results::save', 50, 2 );
|
||||
if ( SP()->mode == 'team' ) add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Performance::save', 60, 2 );
|
||||
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Performance::save', 60, 2 );
|
||||
|
||||
// Save Calendar Meta Boxes
|
||||
add_action( 'sportspress_process_sp_calendar_meta', 'SP_Meta_Box_Calendar_Format::save', 10, 2 );
|
||||
@@ -62,7 +62,7 @@ class SP_Admin_Meta_Boxes {
|
||||
// Save Team Meta Boxes
|
||||
add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Details::save', 10, 2 );
|
||||
add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Columns::save', 20, 2 );
|
||||
if ( SP()->mode == 'team' ) add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Lists::save', 30, 2 );
|
||||
add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Lists::save', 30, 2 );
|
||||
|
||||
// Save Table Meta Boxes
|
||||
add_action( 'sportspress_process_sp_table_meta', 'SP_Meta_Box_Table_Details::save', 10, 2 );
|
||||
@@ -124,7 +124,7 @@ class SP_Admin_Meta_Boxes {
|
||||
add_meta_box( 'sp_videodiv', __( 'Video', 'sportspress' ), 'SP_Meta_Box_Event_Video::output', 'sp_event', 'side', 'low' );
|
||||
if ( sizeof( array_filter( sp_array_value( $post_meta, 'sp_team', array() ) ) ) ):
|
||||
add_meta_box( 'sp_resultsdiv', __( 'Team Results', 'sportspress' ), 'SP_Meta_Box_Event_Results::output', 'sp_event', 'normal', 'high' );
|
||||
if ( SP()->mode == 'team' ) add_meta_box( 'sp_performancediv', __( 'Player Performance', 'sportspress' ), 'SP_Meta_Box_Event_Performance::output', 'sp_event', 'normal', 'high' );
|
||||
add_meta_box( 'sp_performancediv', __( 'Player Performance', 'sportspress' ), 'SP_Meta_Box_Event_Performance::output', 'sp_event', 'normal', 'high' );
|
||||
endif;
|
||||
add_meta_box( 'sp_editordiv', __( 'Article', 'sportspress' ), 'SP_Meta_Box_Event_Editor::output', 'sp_event', 'normal', 'low' );
|
||||
|
||||
@@ -139,7 +139,7 @@ class SP_Admin_Meta_Boxes {
|
||||
add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'SP_Meta_Box_Team_Details::output', 'sp_team', 'side', 'default' );
|
||||
if ( isset( $post ) && isset( $post->ID ) ):
|
||||
if ( get_the_terms( $post->ID, 'sp_league' ) && get_the_terms( $post->ID, 'sp_season' ) ) add_meta_box( 'sp_columnssdiv', __( 'Table Columns', 'sportspress' ), 'SP_Meta_Box_Team_Columns::output', 'sp_team', 'normal', 'high' );
|
||||
if ( SP()->mode == 'team' ) add_meta_box( 'sp_listsdiv', __( 'Player Lists', 'sportspress' ), 'SP_Meta_Box_Team_Lists::output', 'sp_team', 'normal', 'high' );
|
||||
add_meta_box( 'sp_listsdiv', __( 'Player Lists', 'sportspress' ), 'SP_Meta_Box_Team_Lists::output', 'sp_team', 'normal', 'high' );
|
||||
endif;
|
||||
add_meta_box( 'sp_editordiv', __( 'Profile', 'sportspress' ), 'SP_Meta_Box_Team_Editor::output', 'sp_team', 'normal', 'low' );
|
||||
|
||||
|
||||
@@ -37,17 +37,13 @@ class SP_Meta_Box_Event_Teams {
|
||||
wp_dropdown_pages( $args );
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if ( SP()->mode == 'team' ):
|
||||
?>
|
||||
<ul id="sp_team-tabs" class="wp-tab-bar sp-tab-bar">
|
||||
<li class="wp-tab-active"><a href="#sp_player-all"><?php _e( 'Players', 'sportspress' ); ?></a></li>
|
||||
<li class="wp-tab"><a href="#sp_staff-all"><?php _e( 'Staff', 'sportspress' ); ?></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
sp_post_checklist( $post->ID, 'sp_player', 'block', 'sp_current_team', $i );
|
||||
sp_post_checklist( $post->ID, 'sp_staff', 'none', 'sp_current_team', $i );
|
||||
endif;
|
||||
<ul id="sp_team-tabs" class="wp-tab-bar sp-tab-bar">
|
||||
<li class="wp-tab-active"><a href="#sp_player-all"><?php _e( 'Players', 'sportspress' ); ?></a></li>
|
||||
<li class="wp-tab"><a href="#sp_staff-all"><?php _e( 'Staff', 'sportspress' ); ?></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
sp_post_checklist( $post->ID, 'sp_player', 'block', 'sp_current_team', $i );
|
||||
sp_post_checklist( $post->ID, 'sp_staff', 'none', 'sp_current_team', $i );
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -53,17 +53,6 @@ class SP_Settings_General extends SP_Settings_Page {
|
||||
'options' => $presets,
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Mode', 'sportspress' ),
|
||||
'id' => 'sportspress_mode',
|
||||
'default' => 'team',
|
||||
'type' => 'select',
|
||||
'options' => array(
|
||||
'team' => _x( 'Team', 'mode select', 'sportspress' ),
|
||||
'player' => _x( 'Individual', 'mode select', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Google Maps', 'sportspress' ),
|
||||
'id' => 'sportspress_map_type',
|
||||
@@ -141,6 +130,15 @@ class SP_Settings_General extends SP_Settings_Page {
|
||||
'desc_tip' => __( 'This will enable a script allowing the tables to be sortable.', 'sportspress' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Scrollable tables', 'sportspress' ),
|
||||
'id' => 'sportspress_enable_scrollable_tables',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => '',
|
||||
'desc_tip' => __( 'This will enable a script allowing the tables to be scrollable.', 'sportspress' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Live countdowns', 'sportspress' ),
|
||||
'id' => 'sportspress_enable_live_countdowns',
|
||||
|
||||
@@ -57,19 +57,15 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
);
|
||||
|
||||
if ( SP()->mode == 'team' ):
|
||||
$settings[] = array(
|
||||
array(
|
||||
'title' => __( 'Teams', 'sportspress' ),
|
||||
'desc' => __( 'Link teams', 'sportspress' ),
|
||||
'id' => 'sportspress_list_link_teams',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
endif;
|
||||
),
|
||||
|
||||
$settings = array_merge( $settings, array(
|
||||
array(
|
||||
'title' => __( 'Pagination', 'sportspress' ),
|
||||
'desc' => __( 'Paginate', 'sportspress' ),
|
||||
@@ -92,7 +88,7 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'list_options' ),
|
||||
)); // End player settings
|
||||
); // End player settings
|
||||
|
||||
return apply_filters( 'sportspress_player_settings', $settings );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user