get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->add_setting ( 'thbusiness_main_color', array( 'default' => '#eb5937', 'transport' => 'refresh' ) ); $wp_customize->add_control ( new WP_Customize_Color_Control ( $wp_customize, 'thbusiness_main_color', array ( 'label' => 'Site Main Color', 'section' => 'colors', 'settings' => 'thbusiness_main_color' ) ) ); } add_action( 'customize_register', 'thbusiness_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function thbusiness_customize_preview_js() { wp_enqueue_script( 'thbusiness_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'thbusiness_customize_preview_js' ); /** * Writes out the CSS as defined by the values in the Theme Customizer * to the `head` element of the header template. * * @package thbusiness */ function thbusiness_customize_css() { $color = get_theme_mod( 'thbusiness_main_color' ); if ( $color != '#eb5937 ') : ?>