get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->add_section( 'hueman_settings', array( 'title' => __('Layout', 'hueman'), 'priority' => 35, ) ); $wp_customize->add_setting( 'hueman_layout', array( 'default' => 'col-3cm', ) ); $wp_customize->add_control( 'hueman_layout', array( 'label' => 'Site layout', 'section' => 'hueman_settings', 'type' => 'select', 'choices' => array( 'col-1c' => __( '1 Column', 'hueman' ), 'col-2cl' => __( '2 Columns, Main Content in left column', 'hueman' ), 'col-2cr' => __( '2 Columns, Main Content in right column', 'hueman' ), 'col-3cl' => __( '3 Columns, Main Content in left column', 'hueman' ), 'col-3cm' => __( '3 Columns, Main Content centered', 'hueman' ), 'col-3cr' => __( '3 Columns, Main Content in right column', 'hueman' ), ), ) ); } add_action( 'customize_register', 'hueman_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function hueman_customize_preview_js() { wp_enqueue_script( 'hueman_customizer', get_template_directory_uri() . '/functions/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'hueman_customize_preview_js' );