diff --git a/src/wp-content/themes/twentyseventeen/inc/customizer.php b/src/wp-content/themes/twentyseventeen/inc/customizer.php index 77eec7c81a..39753edd8d 100644 --- a/src/wp-content/themes/twentyseventeen/inc/customizer.php +++ b/src/wp-content/themes/twentyseventeen/inc/customizer.php @@ -17,6 +17,15 @@ function twentyseventeen_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; + $wp_customize->selective_refresh->add_partial( 'blogname', array( + 'selector' => '.site-title a', + 'render_callback' => 'twentyseventeen_customize_partial_blogname', + ) ); + $wp_customize->selective_refresh->add_partial( 'blogdescription', array( + 'selector' => '.site-description', + 'render_callback' => 'twentyseventeen_customize_partial_blogdescription', + ) ); + /** * Custom colors. */ @@ -189,6 +198,30 @@ function twentyseventeen_sanitize_colorscheme( $input ) { return 'light'; } +/** + * Render the site title for the selective refresh partial. + * + * @since Twenty Seventeen 1.0 + * @see twentyseventeen_customize_register() + * + * @return void + */ +function twentyseventeen_customize_partial_blogname() { + bloginfo( 'name' ); +} + +/** + * Render the site tagline for the selective refresh partial. + * + * @since Twenty Seventeen 1.0 + * @see twentyseventeen_customize_register() + * + * @return void + */ +function twentyseventeen_customize_partial_blogdescription() { + bloginfo( 'description' ); +} + /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ diff --git a/src/wp-content/themes/twentyseventeen/style.css b/src/wp-content/themes/twentyseventeen/style.css index 955116a645..071c0be2d6 100644 --- a/src/wp-content/themes/twentyseventeen/style.css +++ b/src/wp-content/themes/twentyseventeen/style.css @@ -1567,6 +1567,7 @@ body { .site-title, .site-title a { color: #222; + opacity: 1; /* Prevent opacity from changing during selective refreshes in the customize preview */ } body.has-header-image .site-title,