Changeset 42543
- Timestamp:
- 01/22/2018 07:09:16 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r42536 r42543 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() { … … 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 } … … 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 ); … … 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 );
Note: See TracChangeset
for help on using the changeset viewer.