get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->add_setting( '_swank_copyright', array( 'default' => '', 'sanitize_callback' => '_swank_sanitize_text', ) ); $wp_customize->add_control( '_swank_copyright', array( 'label' => 'Copyright', 'description' => 'Site copyright information to be shown in the footer', 'section' => 'title_tagline', 'type' => 'text', 'priority' => 50, ) ); /** Sanitiziers **/ function _swank_sanitize_text( $input ) { return wp_kses_post( force_balance_tags( $input ) ); } } add_action( 'customize_register', '_swank_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function _swank_customize_preview_js() { wp_enqueue_script( '_swank_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', '_swank_customize_preview_js' );