Quick/Bulk Edit: Show scheduled in status for future drafts.

Change the quick edit status `select` to use the 'Scheduled' status instead of the 'Published' status or posts where the date is in the future. 

Props ipstenu, MrFlannagan, sabernhardt, oglekler.
Fixes #38834.

git-svn-id: https://develop.svn.wordpress.org/trunk@55560 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2023-03-18 15:45:39 +00:00
parent b5ecdb1c9c
commit d37d5aabf4

View File

@@ -376,9 +376,14 @@ window.wp = window.wp || {};
});
// Handle the post status.
var post_date_string = $(':input[name="aa"]').val() + '-' + $(':input[name="mm"]').val() + '-' + $(':input[name="jj"]').val();
post_date_string += ' ' + $(':input[name="hh"]').val() + ':' + $(':input[name="mn"]').val() + ':' + $(':input[name="ss"]').val();
var post_date = new Date( post_date_string );
status = $('._status', rowData).text();
if ( 'future' !== status ) {
if ( 'future' !== status && Date.now() > post_date ) {
$('select[name="_status"] option[value="future"]', editRow).remove();
} else {
$('select[name="_status"] option[value="publish"]', editRow).remove();
}
pw = $( '.inline-edit-password-input' ).prop( 'disabled', false );