WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #44835


Ignore:
Timestamp:
08/23/2018 08:15:43 PM (3 years ago)
Author:
garrett-eclipse
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44835 – Description

    initial v1  
    55Background: I am writing a plugin for a client to introduce Draft Revisions on published posts. I have a cleanup function tied to save_post which purges the Draft Revisions if the post being saved has a status of 'publish' or was previously 'publish'. From normal post submission the original_post_status is available on the $_POST as it's a hidden input on the post editor. From inline-edits this fails as there's no hidden input for original_post_status.
    66
    7 I searched for some time to come up with a solution and settled on a jquery trigger which injected the missing input when the inline-edit row opens. With it present the existing ajax/etc fires properly and populated the missing $_POST['original_post_status'] that I required.
     7I searched for some time to come up with a solution and settled on a jquery trigger which injected the missing input when the inline-edit row opens. With it present the existing ajax/etc fires properly and populated the missing `$_POST['original_post_status']` that I required.
    88
    99Proposition: Add the hidden input for original_post_status onto the inline edit rows to make that information available to save_post.