Get frontend css colors as array

This commit is contained in:
Brian Miyaji
2014-06-13 19:01:30 +10:00
parent 8deb52393e
commit 6a9c14b89d
2 changed files with 2 additions and 2 deletions

View File

@@ -203,7 +203,7 @@ class SP_Settings_General extends SP_Settings_Page {
<td class="forminp"><?php
// Get settings
$colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors' ) );
$colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors', array() ) );
// Defaults
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#364c74';

View File

@@ -105,7 +105,7 @@ class SP_Frontend_Scripts {
if ( $enabled == 'yes' || ! empty( $custom ) || $offset != 0 ) {
$colors = get_option( 'sportspress_frontend_css_colors' );
$colors = (array) get_option( 'sportspress_frontend_css_colors', array() );
echo '<style type="text/css">.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a,.sp-calendar tbody a:hover{background:none;}';