diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index c7b5905f43..5afcd783bd 100644
|
|
|
|
| 7904 | 7904 | previewerAlive = state.instance( 'previewerAlive' ), |
| 7905 | 7905 | editShortcutVisibility = state.instance( 'editShortcutVisibility' ), |
| 7906 | 7906 | changesetLocked = state.instance( 'changesetLocked' ), |
| 7907 | | populateChangesetUuidParam; |
| | 7907 | populateChangesetUuidParam, defaultSelectedChangesetStatus; |
| 7908 | 7908 | |
| 7909 | 7909 | state.bind( 'change', function() { |
| 7910 | 7910 | var canSave; |
| … |
… |
|
| 7938 | 7938 | } else { |
| 7939 | 7939 | saveBtn.val( api.l10n.schedule ); |
| 7940 | 7940 | } |
| 7941 | | } else if ( ! api.settings.changeset.currentUserCanPublish ) { |
| 7942 | | selectedChangesetStatus( 'draft' ); |
| 7943 | | } else { |
| | 7941 | } else if ( api.settings.changeset.currentUserCanPublish ) { |
| 7944 | 7942 | saveBtn.val( api.l10n.publish ); |
| 7945 | 7943 | } |
| 7946 | 7944 | closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel ); |
| … |
… |
|
| 7962 | 7960 | return status; |
| 7963 | 7961 | }; |
| 7964 | 7962 | |
| | 7963 | defaultSelectedChangesetStatus = api.settings.changeset.currentUserCanPublish ? 'publish' : 'draft'; |
| | 7964 | |
| 7965 | 7965 | // Set default states. |
| 7966 | 7966 | changesetStatus( api.settings.changeset.status ); |
| 7967 | 7967 | changesetLocked( Boolean( api.settings.changeset.lockUser ) ); |
| 7968 | 7968 | changesetDate( api.settings.changeset.publishDate ); |
| 7969 | 7969 | selectedChangesetDate( api.settings.changeset.publishDate ); |
| 7970 | | selectedChangesetStatus( '' === api.settings.changeset.status || 'auto-draft' === api.settings.changeset.status ? 'publish' : api.settings.changeset.status ); |
| | 7970 | selectedChangesetStatus( '' === api.settings.changeset.status || 'auto-draft' === api.settings.changeset.status ? defaultSelectedChangesetStatus : api.settings.changeset.status ); |
| 7971 | 7971 | selectedChangesetStatus.link( changesetStatus ); // Ensure that direct updates to status on server via wp.customizer.previewer.save() will update selection. |
| 7972 | 7972 | saved( true ); |
| 7973 | 7973 | if ( '' === changesetStatus() ) { // Handle case for loading starter content. |