diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 5151a12695..cfa09e55a3 100644
|
|
|
7931 | 7931 | previewerAlive = state.instance( 'previewerAlive' ), |
7932 | 7932 | editShortcutVisibility = state.instance( 'editShortcutVisibility' ), |
7933 | 7933 | changesetLocked = state.instance( 'changesetLocked' ), |
7934 | | populateChangesetUuidParam; |
| 7934 | populateChangesetUuidParam, defaultSelectedChangesetStatus; |
7935 | 7935 | |
7936 | 7936 | state.bind( 'change', function() { |
7937 | 7937 | var canSave; |
… |
… |
|
7965 | 7965 | } else { |
7966 | 7966 | saveBtn.val( api.l10n.schedule ); |
7967 | 7967 | } |
7968 | | } else if ( ! api.settings.changeset.currentUserCanPublish ) { |
7969 | | selectedChangesetStatus( 'draft' ); |
7970 | 7968 | } else { |
7971 | 7969 | saveBtn.val( api.l10n.publish ); |
7972 | 7970 | } |
… |
… |
|
7989 | 7987 | return status; |
7990 | 7988 | }; |
7991 | 7989 | |
| 7990 | defaultSelectedChangesetStatus = api.settings.changeset.currentUserCanPublish ? 'publish' : 'draft'; |
| 7991 | |
7992 | 7992 | // Set default states. |
7993 | 7993 | changesetStatus( api.settings.changeset.status ); |
7994 | 7994 | changesetLocked( Boolean( api.settings.changeset.lockUser ) ); |
7995 | 7995 | changesetDate( api.settings.changeset.publishDate ); |
7996 | 7996 | selectedChangesetDate( api.settings.changeset.publishDate ); |
7997 | | selectedChangesetStatus( '' === api.settings.changeset.status || 'auto-draft' === api.settings.changeset.status ? 'publish' : api.settings.changeset.status ); |
| 7997 | selectedChangesetStatus( '' === api.settings.changeset.status || 'auto-draft' === api.settings.changeset.status ? defaultSelectedChangesetStatus : api.settings.changeset.status ); |
7998 | 7998 | selectedChangesetStatus.link( changesetStatus ); // Ensure that direct updates to status on server via wp.customizer.previewer.save() will update selection. |
7999 | 7999 | saved( true ); |
8000 | 8000 | if ( '' === changesetStatus() ) { // Handle case for loading starter content. |