Changeset 3196 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
- Timestamp:
- 05/20/2016 05:50:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r3193 r3196 110 110 111 111 /** 112 * Add postMessage support for site title and description for the Theme Customizer. 113 * 114 * @param \WP_Customize_Manager $wp_customize Theme Customizer object. 115 */ 116 function customize_register( $wp_customize ) { 117 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 118 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 119 } 120 add_action( 'customize_register', __NAMESPACE__ . '\customize_register' ); 121 122 /** 123 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 124 */ 125 function customize_preview_js() { 126 wp_enqueue_script( 'wporg_plugins_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); 127 } 128 add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_js' ); 129 130 /** 112 131 * Custom template tags for this theme. 113 132 */ 114 133 require get_template_directory() . '/inc/template-tags.php'; 115 116 /**117 * Customizer additions.118 */119 require get_template_directory() . '/inc/customizer.php';
Note: See TracChangeset
for help on using the changeset viewer.