[wp-trac] [WordPress Trac] #54020: Add a filter to allow updating post without changing the modified dates
WordPress Trac
noreply at wordpress.org
Mon Aug 30 00:09:23 UTC 2021
#54020: Add a filter to allow updating post without changing the modified dates
-------------------------------------------------+-------------------------
Reporter: pbearne | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Resolution:
Keywords: has-unit-tests has-dev-note dev- | Focuses:
feedback has-patch |
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
I'm a little unclear on the advantage the proposed filter offers over
`wp_insert_post_data`.
With the exception of posts that have been untrashed, the `get_post()`
call within the sample code should be in the object cache and be
relatively quick.
The complexity of the if statement in the proposed patch seems a lot to
include for what appears to be a niche use case.
A number of actions and filters in `wp_insert_post()` include the post
object before any changes, would this be helpful to include in
`wp_insert_attachment_data` and `wp_insert_post_data`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54020#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list