diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js
index cdca55dd89..a32ae68160 100644
a
|
b
|
window.wp = window.wp || {}; |
413 | 413 | $.post( ajaxurl, params, |
414 | 414 | function(r) { |
415 | 415 | var $errorNotice = $( '#edit-' + id + ' .inline-edit-save .notice-error' ), |
416 | | $error = $errorNotice.find( '.error' ); |
| 416 | $error = $errorNotice.find( '.error' ), |
| 417 | oldPostStatus = $('#edit-'+id + ' :input[name="_status"]').val(); |
417 | 418 | |
418 | 419 | $( 'table.widefat .spinner' ).removeClass( 'is-active' ); |
419 | 420 | $( '.ac_results' ).hide(); |
420 | 421 | |
421 | 422 | if (r) { |
| 423 | // Change the value of the original post type on success to the value _status. |
| 424 | $('.inline-edit-save input[name="original_post_status"]').val(oldPostStatus); |
| 425 | |
422 | 426 | if ( -1 !== r.indexOf( '<tr' ) ) { |
423 | 427 | $(inlineEditPost.what+id).siblings('tr.hidden').addBack().remove(); |
424 | 428 | $('#edit-'+id).before(r).remove(); |
diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
index ced70bad84..b5abbe7b2c 100644
a
|
b
|
if ( ! $bulk && $can_publish ) : |
1814 | 1814 | } |
1815 | 1815 | ?> |
1816 | 1816 | <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" /> |
| 1817 | <input type="hidden" name="original_post_status" value="<?php echo esc_attr(get_post_status( $post->ID )); ?>" /> |
1817 | 1818 | <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" /> |
1818 | 1819 | <?php if ( ! $bulk && ! post_type_supports( $screen->post_type, 'author' ) ) { ?> |
1819 | 1820 | <input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" /> |