Changeset 30891
- Timestamp:
- 12/16/2014 11:52:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/customize-preview.js
r30306 r30891 68 68 return; 69 69 70 var preview,bg;70 var bg; 71 71 72 preview = new api.Preview({72 api.preview = new api.Preview({ 73 73 url: window.location.href, 74 74 channel: api.settings.channel 75 75 }); 76 76 77 preview.bind( 'settings', function( values ) {77 api.preview.bind( 'settings', function( values ) { 78 78 $.each( values, function( id, value ) { 79 79 if ( api.has( id ) ) … … 84 84 }); 85 85 86 preview.trigger( 'settings', api.settings.values );86 api.preview.trigger( 'settings', api.settings.values ); 87 87 88 preview.bind( 'setting', function( args ) {88 api.preview.bind( 'setting', function( args ) { 89 89 var value; 90 90 … … 95 95 }); 96 96 97 preview.bind( 'sync', function( events ) {97 api.preview.bind( 'sync', function( events ) { 98 98 $.each( events, function( event, args ) { 99 preview.trigger( event, args );99 api.preview.trigger( event, args ); 100 100 }); 101 preview.send( 'synced' );101 api.preview.send( 'synced' ); 102 102 }); 103 103 104 preview.bind( 'active', function() {104 api.preview.bind( 'active', function() { 105 105 if ( api.settings.nonce ) { 106 preview.send( 'nonce', api.settings.nonce );106 api.preview.send( 'nonce', api.settings.nonce ); 107 107 } 108 108 109 preview.send( 'documentTitle', document.title );109 api.preview.send( 'documentTitle', document.title ); 110 110 }); 111 111 112 preview.send( 'ready', {112 api.preview.send( 'ready', { 113 113 activePanels: api.settings.activePanels, 114 114 activeSections: api.settings.activeSections, … … 155 155 }); 156 156 }); 157 158 api.trigger( 'preview-ready' ); 157 159 }); 158 160
Note: See TracChangeset
for help on using the changeset viewer.