Apply align and padding settings only if styled
This commit is contained in:
@@ -40,8 +40,7 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
|
|
||||||
$presets = SP_Admin_Sports::get_preset_options();
|
$presets = SP_Admin_Sports::get_preset_options();
|
||||||
|
|
||||||
return apply_filters( 'sportspress_general_settings', array(
|
$settings = array(
|
||||||
|
|
||||||
array( 'title' => __( 'General Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'general_options' ),
|
array( 'title' => __( 'General Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'general_options' ),
|
||||||
|
|
||||||
array( 'type' => 'country' ),
|
array( 'type' => 'country' ),
|
||||||
@@ -82,7 +81,10 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
array( 'title' => __( 'Styles and Scripts', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'script_styling_options' ),
|
array( 'title' => __( 'Styles and Scripts', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'script_styling_options' ),
|
||||||
|
|
||||||
array( 'type' => 'frontend_styles' ),
|
array( 'type' => 'frontend_styles' ),
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( ( $styles = SP_Frontend_Scripts::get_styles() ) && array_key_exists( 'sportspress-general', $styles ) ):
|
||||||
|
$settings = array_merge( $settings, array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Align', 'sportspress' ),
|
'title' => __( 'Align', 'sportspress' ),
|
||||||
'id' => 'sportspress_table_text_align',
|
'id' => 'sportspress_table_text_align',
|
||||||
@@ -108,7 +110,10 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
'step' => 1
|
'step' => 1
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
));
|
||||||
|
endif;
|
||||||
|
|
||||||
|
$settings = array_merge( $settings, array(
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Custom CSS', 'sportspress' ),
|
'title' => __( 'Custom CSS', 'sportspress' ),
|
||||||
'id' => 'sportspress_custom_css',
|
'id' => 'sportspress_custom_css',
|
||||||
@@ -158,8 +163,9 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
),
|
),
|
||||||
|
|
||||||
array( 'type' => 'sectionend', 'id' => 'script_styling_options' ),
|
array( 'type' => 'sectionend', 'id' => 'script_styling_options' ),
|
||||||
|
));
|
||||||
|
|
||||||
)); // End general settings
|
return apply_filters( 'sportspress_general_settings', $settings ); // End general settings
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user