- Timestamp:
- 08/28/2012 02:18:43 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/js/theme-customizer.js
r21622 r21639 3 3 * 4 4 * Contains handlers to make Theme Customizer preview reload changes asynchronously. 5 * Things like fonts, site title anddescription, and background color changes.5 * Things like site title, description, and background color changes. 6 6 * 7 * See related settings in Twenty_Twelve_Options::customize_preview_js()7 * See related settings in twentytwelve_customize_preview_js() 8 8 */ 9 9 … … 21 21 } ); 22 22 23 // Custom fonts.24 wp.customize( twentytwelve_customizer.option_key + '[enable_fonts]', function( value ) {25 value.bind( function( to ) {26 if ( to ) {27 $( 'head' ).append( '<link rel="stylesheet" id="twentytwelve-fonts-css" href="' + twentytwelve_customizer.link + '" type="text/css" media="all" />' );28 } else {29 $( '#twentytwelve-fonts-css' ).remove();30 }31 } );32 } );33 34 23 // Hook into background color change and adjust body class value as needed. 35 24 wp.customize( 'background_color', function( value ) {
Note: See TracChangeset
for help on using the changeset viewer.