Last active
August 29, 2015 14:22
-
-
Save devinsays/13c75347b239bfb938c0 to your computer and use it in GitHub Desktop.
Tagline Color Style Output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Output styles in the header | |
*/ | |
function prefix_inline_styles() { | |
$options = get_option( 'prefix', false ); | |
if ( ! $options ) { | |
return; | |
} | |
$output = ''; | |
if ( isset( $options['header_taglinecolor'] ) ) { | |
$output .= ".site-description { color:" . sanitize_hex_color( $options['header_taglinecolor'] ) . " }\n"; | |
} | |
// Output styles | |
if ($output <> '') { | |
$output = "<!-- Custom Styling -->\n<style type=\"text/css\">\n" . $output . "</style>\n"; | |
echo $output; | |
} | |
} | |
add_action( 'wp_head', 'prefix_inline_styles', 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment