add_section( 'mainheader', array( 'title' => __('Website Header', 'wm4'), 'priority' => 40, 'description' => '' ) ); $wp_customize->add_setting( 'wm4_options[header_background_color]', array( 'default' => '#ffffff', 'transport' => 'refresh', 'type' => 'option' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array( 'label' => __( 'Background Color', 'wm4' ), 'section' => 'mainheader', 'settings' => 'wm4_options[header_background_color]', ) ) ); // Load javascript in preview footer, to connect the values we set // and see changes live in the preview if ( $wp_customize->is_preview() && ! is_admin() ) { add_action( 'wp_footer', array(&$this,'previewScript'), 21); } } /*********************** /* /* Javascript added to the preview footer /* to catch and bind changed designer values /* /************************/ public function previewScript() { ?>