$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
+ if ( isset( $wp_customize->selective_refresh ) ) {
+ $wp_customize->selective_refresh->add_partial( 'blogname', array(
+ 'selector' => '.site-title a',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentyfourteen_customize_partial_blogname',
+ ) );
+ $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
+ 'selector' => '.site-description',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
+ ) );
+ }
+
// Rename the label to "Site Title Color" because this only affects the site title in this theme.
$wp_customize->get_control( 'header_textcolor' )->label = __( 'Site Title Color', 'twentyfourteen' );
}
add_action( 'customize_register', 'twentyfourteen_customize_register' );
+/**
+ * Render the site title for the selective refresh partial.
+ *
+ * @since Twenty Fourteen 1.7
+ * @see twentyfourteen_customize_register()
+ *
+ * @return void
+ */
+function twentyfourteen_customize_partial_blogname() {
+ bloginfo( 'name' );
+}
+
+/**
+ * Render the site tagline for the selective refresh partial.
+ *
+ * @since Twenty Fourteen 1.7
+ * @see twentyfourteen_customize_register()
+ *
+ * @return void
+ */
+function twentyfourteen_customize_partial_blogdescription() {
+ bloginfo( 'description' );
+}
+
/**
* Sanitize the Featured Content layout value.
*