inc/customizer.php
public function selective_refresh( WP_Customize_Manager $wp_customize ) {

		$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
		$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
		$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

		if ( ! isset( $wp_customize->selective_refresh ) ) {

			return;

		}

		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'            => '.site-title a',
				'container_inclusive' => false,
				'render_callback'     => array( $this, 'blogname' ),
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'            => '.site-description',
				'container_inclusive' => false,
				'render_callback'     => array( $this, 'blogdescription' ),
			)
		);

	}
public function selective_refresh( WP_Customize_Manager $wp_customize ) {

		$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
		$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
		$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

		if ( ! isset( $wp_customize->selective_refresh ) ) {

			return;

		}

		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'            => '.site-title a',
				'container_inclusive' => false,
				'render_callback'     => array( $this, 'blogname' ),
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'            => '.site-description',
				'container_inclusive' => false,
				'render_callback'     => array( $this, 'blogdescription' ),
			)
		);

	}
public function selective_refresh ( WP_Customize_Manager $ wp_customize ) { $ wp_customize -> get_setting ( 'blogname' ) -> transport = 'postMessage' ; $ wp_customize -> get_setting ( 'blogdescription' ) -> transport = 'postMessage' ; $ wp_customize -> get_setting ( 'header_textcolor' ) -> transport = 'postMessage' ; if ( ! isset ( $ wp_customize -> selective_refresh ) ) { return ; } $ wp_customize -> selective_refresh -> add_partial ( 'blogname' , array ( 'selector' => '.site-title a' , 'container_inclusive' => false , 'render_callback' => array ( $ this , 'blogname' ) , ) ) ; $ wp_customize -> selective_refresh -> add_partial ( 'blogdescription' , array ( 'selector' => '.site-description' , 'container_inclusive' => false , 'render_callback' => array ( $ this , 'blogdescription' ) , ) ) ; }
Adds postMessage support for site title and description for the Customizer.

@action customize_register
@since  1.0.0
@uses   $this->blogname()
@uses   $this->blogdescription()

@param WP_Customize_Manager $wp_customize
Adds postMessage support for site title and description for the Customizer .