Reorder frontend CSS colors

This commit is contained in:
Brian Miyaji
2014-05-11 03:43:49 +10:00
parent 30194f904e
commit 4cffef9b60
3 changed files with 26 additions and 20 deletions

View File

@@ -86,6 +86,12 @@ class SP_Frontend_Scripts {
}
}
/**
* Output custom CSS.
*
* @access public
* @return void
*/
public function custom_css() {
$enabled = get_option( 'sportspress_enable_frontend_css', 'yes' );
$custom = get_option( 'sportspress_custom_css', null );
@@ -102,17 +108,17 @@ class SP_Frontend_Scripts {
if ( isset( $colors['primary'] ) )
echo '.sp-data-table th,.sp-calendar th,.sp-data-table tfoot,.sp-calendar tfoot{background:' . $colors['primary'] . ' !important}.sp-data-table tbody a,.sp-calendar tbody a{color:' . $colors['primary'] . ' !important}';
if ( isset( $colors['heading'] ) )
echo '.sp-data-table th,.sp-data-table th a,.sp-data-table tfoot,.sp-data-table tfoot a,.sp-calendar th,.sp-calendar th a,.sp-calendar tfoot,.sp-calendar tfoot a{color: ' . $colors['heading'] . ' !important}';
if ( isset( $colors['background'] ) )
echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . $colors['background'] . ' !important}';
if ( isset( $colors['text'] ) )
echo '.sp-data-table tbody,.sp-calendar tbody{color: ' . $colors['text'] . ' !important}';
if ( isset( $colors['heading'] ) )
echo '.sp-data-table th,.sp-data-table th a,.sp-data-table tfoot,.sp-data-table tfoot a,.sp-calendar th,.sp-calendar th a,.sp-calendar tfoot,.sp-calendar tfoot a{color: ' . $colors['heading'] . ' !important}';
if ( isset( $colors['link'] ) )
echo '.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a:focus{color: ' . $colors['link'] . ' !important}';
if ( isset( $colors['background'] ) )
echo '.sp-data-table tbody,.sp-calendar tbody{background: ' . $colors['background'] . ' !important}';
}
if ( ! empty( $custom ) )