wp-content/themes/twentysixteen/inc/customizer.php:115Adds postMessage support for site title and description for the Customizer.
$wp_customizeWP_Customize_Managerfunction twentysixteen_customize_register( $wp_customize ) { $color_scheme = twentysixteen_get_color_scheme(); $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->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' => 'twentysixteen_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'container_inclusive' => false, 'render_callback' => 'twentysixteen_customize_partial_blogdescription', ) ); } // Add color scheme setting and control. $wp_customize->add_setting( 'color_scheme', array( 'default' => 'default', 'sanitize_callback' => 'twentysixteen_sanitize_color_scheme', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'color_scheme', array( 'label' => __( 'Base Color Scheme', 'twentysixteen' ), 'section' => 'colors', 'type' => 'select', 'choices' => twentysixteen_get_color_scheme_choices(), 'priority' => 1, ) ); // Add page background color setting and control. $wp_customize->add_setting( 'page_background_color', array( 'default' => $color_scheme[1], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'page_background_color', array( 'label' => __( 'Page Background Color', 'twentysixteen' ), 'section' => 'colors', ) ) ); // Remove the core header textcolor control, as it shares the main text color. $wp_customize->remove_control( 'header_textcolor' ); // Add link color setting and control. $wp_customize->add_setting( 'link_color', array( 'default' => $color_scheme[2], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) );Introduced in Twenty Sixteen 1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentysixteen/inc/customizer.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.