Changeset 4111
- Timestamp:
- 09/20/2016 07:06:47 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php
r4109 r4111 2 2 namespace WordPressdotorg\Make\Breathe; 3 3 4 /** 5 * Sets up theme defaults. 6 */ 4 7 function after_setup_theme() { 5 8 remove_theme_support( 'custom-header' ); … … 9 12 remove_action( 'customize_preview_init', 'breathe_customize_preview_js' ); 10 13 remove_filter( 'wp_head', 'breathe_color_styles' ); 14 15 add_action( 'customize_register', __NAMESPACE__ . '\customize_register' ); 11 16 } 12 17 add_action( 'after_setup_theme', __NAMESPACE__ . '\after_setup_theme', 11 ); 18 19 /** 20 * Add postMessage support for site title and description in the customizer. 21 * 22 * @param WP_Customize_Manager $wp_customize The customizer object. 23 */ 24 function customize_register( $wp_customize ) { 25 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 26 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 27 28 if ( isset( $wp_customize->selective_refresh ) ) { 29 $wp_customize->selective_refresh->add_partial( 'blogname', [ 30 'selector' => '.site-title a', 31 'container_inclusive' => false, 32 'render_callback' => __NAMESPACE__ . '\customize_partial_blogname', 33 ] ); 34 } 35 } 36 37 /** 38 * Renders the site title for the selective refresh partial. 39 */ 40 function customize_partial_blogname() { 41 bloginfo( 'name' ); 42 } 13 43 14 44 function styles() {
Note: See TracChangeset
for help on using the changeset viewer.