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

  1. if ( !function_exists( 'twentythirteen_customize_register' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // Customizer object. 
  5. $wp_customize = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = twentythirteen_customize_register($wp_customize); 
  9.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function twentythirteen_customize_register( $wp_customize ) { 
  2. $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 
  3. $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 
  4. $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 
  5.  
  6. if ( isset( $wp_customize->selective_refresh ) ) { 
  7. $wp_customize->selective_refresh->add_partial( 'blogname', array( 
  8. 'selector' => '.site-title',  
  9. 'container_inclusive' => false,  
  10. 'render_callback' => 'twentythirteen_customize_partial_blogname',  
  11. ) ); 
  12. $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 
  13. 'selector' => '.site-description',  
  14. 'container_inclusive' => false,  
  15. ) );