[wp-trac] [WordPress Trac] #39345: Request for hook after posts are completely updated via the rest API
WordPress Trac
noreply at wordpress.org
Tue Dec 20 17:05:49 UTC 2016
#39345: Request for hook after posts are completely updated via the rest API
-------------------------+-----------------------------
Reporter: jazbek | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: normal | Keywords:
Focuses: rest-api |
-------------------------+-----------------------------
We have a post that has its title generated automatically using a
concatenation of the title of a p2p connection and a meta value attached
to the post.
Prior to 4.7 (we were using 4.6+ the rest API plugin) we've been using a
method hooked to both `wp_insert_post` (if the post was edited via the
regular admin) and `rest_insert_$post_type` (if the post was edited via
the API).
We're now working on updating our code to work with 4.7, and our post
titles are not being updated with new values any longer when they're
edited via the rest api.
Ticket https://core.trac.wordpress.org/ticket/38905 moved
`rest_insert_$post_type` to fire before the metadata is updated. There is
no longer a hook that runs on the post after all of the post data ($post +
all meta) is updated. We could hook into `updated_metadata` but that runs
on every field and would be much more inefficient to use.
Would it be possible to add an action or filter to the rest api posts
controller that a post can be passed through after it's completely done
being updated?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39345>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list