Changeset 41969
- Timestamp:
- 10/23/2017 12:40:05 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r41961 r41969 5798 5798 api.state( 'saved' ).bind( control.updatePreviewLink ); 5799 5799 api.state( 'changesetStatus' ).bind( control.updatePreviewLink ); 5800 api.state( 'activated' ).bind( control.updatePreviewLink ); 5801 api.previewer.previewUrl.bind( control.updatePreviewLink ); 5800 5802 5801 5803 button.element.on( 'click', function( event ) { … … 7587 7589 */ 7588 7590 getFrontendPreviewUrl: function() { 7589 var previewer = this, 7590 a = document.createElement( 'a' ), 7591 params = {}; 7591 var previewer = this, params, urlParser; 7592 urlParser = document.createElement( 'a' ); 7593 urlParser.href = previewer.previewUrl.get(); 7594 params = api.utils.parseQueryString( urlParser.search.substr( 1 ) ); 7592 7595 7593 7596 if ( api.state( 'changesetStatus' ).get() && 'publish' !== api.state( 'changesetStatus' ).get() ) { 7594 7597 params.customize_changeset_uuid = api.settings.changeset.uuid; 7595 7598 } 7596 7597 a.href = previewer.previewUrl(); 7598 a.search = $.param( params ); 7599 7600 return a.href; 7599 if ( ! api.state( 'activated' ).get() ) { 7600 params.customize_theme = api.settings.theme.stylesheet; 7601 } 7602 if ( api.settings.changeset.autosaved || ! api.state( 'saved' ).get() ) { 7603 params.customize_autosaved = 'on'; 7604 } 7605 7606 urlParser.search = $.param( params ); 7607 return urlParser.href; 7601 7608 } 7602 7609 });
Note: See TracChangeset
for help on using the changeset viewer.