Changeset 3196
- Timestamp:
- 05/20/2016 05:50:02 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
- Files:
-
- 1 deleted
- 2 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'; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/customizer.js
r3193 r3196 20 20 } ); 21 21 } ); 22 23 // Header text color.24 wp.customize( 'header_textcolor', function( value ) {25 value.bind( function( to ) {26 if ( 'blank' === to ) {27 $( '.site-title a, .site-description' ).css( {28 'clip': 'rect(1px, 1px, 1px, 1px)',29 'position': 'absolute'30 } );31 } else {32 $( '.site-title a, .site-description' ).css( {33 'clip': 'auto',34 'position': 'relative'35 } );36 $( '.site-title a, .site-description' ).css( {37 'color': to38 } );39 }40 } );41 } );42 22 } )( jQuery );
Note: See TracChangeset
for help on using the changeset viewer.