twentythirteen_customize_register
Add postMessage support for site title and description for the Customizer.
Description
twentythirteen_customize_register( (WP_Customize_Manager) $wp_customize );
Parameters (1)
- 0. $wp_customize (WP_Customize_Manager)
- Customizer object.
Usage
if ( !function_exists( 'twentythirteen_customize_register' ) ) { require_once '/functions.php'; } // Customizer object. $wp_customize = null; // NOTICE! Understand what this does before running. $result = twentythirteen_customize_register($wp_customize);
Defined (1)
The function is defined in the following location(s).
- /functions.php
- function twentythirteen_customize_register( $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 ) ) {
- $wp_customize->selective_refresh->add_partial( 'blogname', array(
- 'selector' => '.site-title',
- 'container_inclusive' => false,
- 'render_callback' => 'twentythirteen_customize_partial_blogname',
- ) );
- $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
- 'selector' => '.site-description',
- 'container_inclusive' => false,
- 'render_callback' => 'twentythirteen_customize_partial_blogdescription',
- ) );
- }
- }