Only hide enable checkbox when SP theme active
This commit is contained in:
@@ -28,9 +28,7 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
||||||
add_action( 'sportspress_admin_field_country', array( $this, 'country_setting' ) );
|
add_action( 'sportspress_admin_field_country', array( $this, 'country_setting' ) );
|
||||||
add_action( 'sportspress_settings_save_' . $this->id, array( $this, 'save' ) );
|
add_action( 'sportspress_settings_save_' . $this->id, array( $this, 'save' ) );
|
||||||
|
add_action( 'sportspress_admin_field_frontend_styles', array( $this, 'frontend_styles_setting' ) );
|
||||||
if ( ( $styles = SP_Frontend_Scripts::get_styles() ) && array_key_exists( 'sportspress-general', $styles ) )
|
|
||||||
add_action( 'sportspress_admin_field_frontend_styles', array( $this, 'frontend_styles_setting' ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -195,11 +193,13 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
$this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
$this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
|
||||||
$this->color_picker( __( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] );
|
$this->color_picker( __( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] );
|
||||||
|
|
||||||
?><br>
|
if ( ( $styles = SP_Frontend_Scripts::get_styles() ) && array_key_exists( 'sportspress-general', $styles ) ):
|
||||||
<label for="sportspress_enable_frontend_css">
|
?><br>
|
||||||
<input name="sportspress_enable_frontend_css" id="sportspress_enable_frontend_css" type="checkbox" value="1" <?php checked( get_option( 'sportspress_enable_frontend_css', 'yes' ), 'yes' ); ?>>
|
<label for="sportspress_enable_frontend_css">
|
||||||
<?php _e( 'Enable', 'sportspress' ); ?>
|
<input name="sportspress_enable_frontend_css" id="sportspress_enable_frontend_css" type="checkbox" value="1" <?php checked( get_option( 'sportspress_enable_frontend_css', 'yes' ), 'yes' ); ?>>
|
||||||
</label>
|
<?php _e( 'Enable', 'sportspress' ); ?>
|
||||||
|
</label>
|
||||||
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr><?php
|
</tr><?php
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user