Remove alternate and add link color setting

This commit is contained in:
Brian Miyaji
2014-05-10 22:44:07 +10:00
parent 39a2bcffb1
commit bbf851eb94
4 changed files with 16 additions and 9 deletions

View File

@@ -126,15 +126,15 @@ class SP_Settings_General extends SP_Settings_Page {
$primary = ( ! empty( $_POST['sportspress_frontend_css_primary'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_primary'] ) : '';
$heading = ( ! empty( $_POST['sportspress_frontend_css_heading'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_heading'] ) : '';
$text = ( ! empty( $_POST['sportspress_frontend_css_text'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_text'] ) : '';
$link = ( ! empty( $_POST['sportspress_frontend_css_link'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_link'] ) : '';
$background = ( ! empty( $_POST['sportspress_frontend_css_background'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_background'] ) : '';
$alternate = ( ! empty( $_POST['sportspress_frontend_css_alternate'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_alternate'] ) : '';
$colors = array(
'primary' => $primary,
'heading' => $heading,
'text' => $text,
'background' => $background,
'alternate' => $alternate
'link' => $link
);
update_option( 'sportspress_frontend_css_colors', $colors );
@@ -186,14 +186,14 @@ class SP_Settings_General extends SP_Settings_Page {
if ( empty( $colors['heading'] ) ) $colors['heading'] = '#ffffff';
if ( empty( $colors['text'] ) ) $colors['text'] = '#222222';
if ( empty( $colors['background'] ) ) $colors['background'] = '#f5f5f5';
if ( empty( $colors['alternate'] ) ) $colors['alternate'] = '#f0f0f0';
if ( empty( $colors['link'] ) ) $colors['link'] = '#00a69c';
// Show inputs
$this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
$this->color_picker( __( 'Heading', 'sportspress' ), 'sportspress_frontend_css_heading', $colors['heading'] );
$this->color_picker( __( 'Text', 'sportspress' ), 'sportspress_frontend_css_text', $colors['text'] );
$this->color_picker( __( 'Link', 'sportspress' ), 'sportspress_frontend_css_link', $colors['link'] );
$this->color_picker( __( 'Background', 'sportspress' ), 'sportspress_frontend_css_background', $colors['background'] );
$this->color_picker( __( 'Alternate', 'sportspress' ), 'sportspress_frontend_css_alternate', $colors['alternate'] );
?><br>
<label for="sportspress_enable_frontend_css">