[wp-trac] [WordPress Trac] #44835: Add a hidden input for 'original_post_status' to the inline-edit rows so it's available on the $_POST in save_post

WordPress Trac noreply at wordpress.org
Mon Aug 27 00:18:37 UTC 2018


#44835: Add a hidden input for 'original_post_status' to the inline-edit rows so
it's available on the $_POST in save_post
--------------------------------------+------------------------------
 Reporter:  garrett-eclipse           |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Editor                    |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:  administration
--------------------------------------+------------------------------
Changes (by jojotjebaby):

 * keywords:  needs-patch good-first-bug => good-first-bug has-patch


Comment:

 I added a patch in order to make available the
 $_POST['original_post_status']. I also had to change some code in the JS
 file for changing the value of this field after updating. Without the JS,
 the field would only reflect the old post status upon pageload. And would
 not change after saving changes in the inline editor.

 Please review my submission :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44835#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list