add_section( 'brawny_general_settings', array( 'title' => 'General Settings', 'type' => 'theme_mod', 'priority' => 1 ) ); $wp_customize->add_setting( 'brawny_color_scheme', array( 'default' => 0, 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'brawny_color_scheme', array( 'section' => 'brawny_general_settings', 'label' => __('Select Color Scheme', 'brawny'), 'type' => 'select', 'choices' => array('default', 'green'), 'priority' => 1, ) ); $wp_customize->add_setting( 'brawny_enable_breadcrumb', array( 'default' => 0, 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'brawny_enable_breadcrumb', array( 'section' => 'brawny_general_settings', 'label' => __('Enable Breadcrumb', 'brawny'), 'type' => 'checkbox', 'priority' => 2, ) ); $wp_customize->add_setting( 'brawny_breadcrumb_chars', array( 'default' => 1, 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'brawny_breadcrumb_chars', array( 'section' => 'brawny_general_settings', 'label' => __('Select Breadcrumb Character', 'brawny'), 'type' => 'select', 'choices' => array( '1' => '»', '2' => '>', '3' => '/', ), 'priority' => 2, ) ); */ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; } add_action( 'customize_register', 'brawny_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function brawny_customize_preview_js() { wp_enqueue_script( 'brawny_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'brawny_customize_preview_js' );