Get frontend css colors as array
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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;}';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user