Changeset 20919
- Timestamp:
- 05/25/2012 10:43:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/customize-preview.dev.js
r20908 r20919 82 82 83 83 api.when.apply( api, bg ).done( function( color, image, position_x, repeat, attachment ) { 84 var style = $('#custom-background-css'), 84 var body = $(document.body), 85 style = $('#custom-background-css'), 85 86 update; 86 87 88 // If custom backgrounds are active and we can't find the 89 // default output, bail. 90 if ( body.hasClass('custom-background') && ! style.length ) 91 return; 92 93 // Create the CSS container if it doesn't already exist. 87 94 if ( ! style.length ) 88 return;95 style = $('<style type="text/css" id="custom-background-css" />').appendTo('head'); 89 96 90 97 update = function() { 91 98 var css = ''; 99 100 // The body will support custom backgrounds if either 101 // the color or image are set. 102 // 103 // See get_body_class() in /wp-includes/post-template.php 104 body.toggleClass( 'custom-background', !! ( color() || image() ) ); 92 105 93 106 if ( color() )
Note: See TracChangeset
for help on using the changeset viewer.