Add revision tracking for Quick Edit updates in WordPress core#8112
Add revision tracking for Quick Edit updates in WordPress core#8112wprashed wants to merge 1 commit intoWordPress:trunkfrom
Conversation
Enhances the `edit_post()` function to create revisions for changes made via the Quick Edit feature in the WordPress admin. This ensures that updates performed through Quick Edit are tracked as revisions, allowing users to revert changes if necessary. Key changes: - Added a check for the `_inline_edit` field in `$_POST` to detect Quick Edit usage. - Ensured revisions are only created for post types that support revisions. - Included validation to confirm the post exists before attempting updates. - Used `wp_save_post_revision()` to save revisions for Quick Edit updates. This improvement enhances data integrity and provides better traceability for admin post updates.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Trac Ticket MissingThis pull request is missing a link to a Trac ticket. For a contribution to be considered, there must be a corresponding ticket in Trac. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. More information about contributing to WordPress on GitHub can be found in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Enhances the
edit_post()function to create revisions for changes made via the Quick Edit feature in the WordPress admin. This ensures that updates performed through Quick Edit are tracked as revisions, allowing users to revert changes if necessary.Key changes:
_inline_editfield in$_POSTto detect Quick Edit usage.wp_save_post_revision()to save revisions for Quick Edit updates.This improvement enhances data integrity and provides better traceability for admin post updates.