Skip to content

Instantly share code, notes, and snippets.

@devinsays
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devinsays/b5cbe81ce737f0f7e463 to your computer and use it in GitHub Desktop.
Save devinsays/b5cbe81ce737f0f7e463 to your computer and use it in GitHub Desktop.
Tagline Color Option
<?php
/**
* Additional theme customizer options
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function prefix_customize_register( $wp_customize ) {
$wp_customize->add_setting( 'prefix[header_taglinecolor]', array(
'default' => '#222222',
'type' => 'option'
) );
if ( get_theme_mod( 'header_textcolor') !== 'blank' ) {
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_tagline_color', array(
'label' => __( 'Header Tagline Color', 'govpress' ),
'section' => 'colors',
'settings' => 'prefix[header_taglinecolor]'
) ) );
}
$wp_customize->get_setting( 'header_taglinecolor' )->transport = 'postMessage';
}
add_action( 'customize_register', 'prefix_customize_register' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment