Escape frontend colors
This commit is contained in:
@@ -320,6 +320,7 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
<?php
|
<?php
|
||||||
// Get settings
|
// Get settings
|
||||||
$colors = array_map( 'esc_attr', (array) get_option( 'themeboy', array() ) );
|
$colors = array_map( 'esc_attr', (array) get_option( 'themeboy', array() ) );
|
||||||
|
if ( empty( $colors ) ) $colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors', array() ) );
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
||||||
|
|||||||
@@ -148,7 +148,8 @@ class SP_Frontend_Scripts {
|
|||||||
$offset = ( 'twentyfourteen' == $template ? 48 : 0 );
|
$offset = ( 'twentyfourteen' == $template ? 48 : 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$colors = (array) get_option( 'themeboy', array() );
|
$colors = array_map( 'esc_attr', (array) get_option( 'themeboy', array() ) );
|
||||||
|
if ( empty( $colors ) ) $colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors', array() ) );
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
||||||
|
|||||||
Reference in New Issue
Block a user