get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; // Rename the label to "Display Site Title & Tagline" in order to make this option extra clear. $wp_customize->get_control( 'display_header_text' )->label = __( 'Display Site Title & Tagline', 'alovernat' ); } add_action( 'customize_register', 'alovernat_customize_register' ); /** * Bind JS handlers to make Theme Customizer preview reload changes asynchronously. * * @since Alovernat 1.0 */ function alovernat_customize_preview_js() { wp_enqueue_script( 'alovernat_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20141027', true ); } add_action( 'customize_preview_init', 'alovernat_customize_preview_js' ); /** * Add contextual help to the Themes and Post edit screens. * * @since Alovernat 1.0 */ function alovernat_contextual_help() { if ( 'admin_head-edit.php' === current_filter() && 'post' !== $GLOBALS['typenow'] ) { return; } get_current_screen()->add_help_tab( array( 'id' => 'alovernat', 'title' => __( 'Alovernat', 'alovernat' ), 'content' => '', ) ); } add_action( 'admin_head-themes.php', 'alovernat_contextual_help' ); add_action( 'admin_head-edit.php', 'alovernat_contextual_help' );