[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 19:14:15 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 | Resolution:
Keywords: | Focuses: rest-api
-------------------------+------------------------------
Comment (by jnylen0):
Replying to [comment:2 jazbek]:
> I think it would be ideal if `wp_insert_post` and
`rest_insert_$post_type` were "parallel" so to speak, like they were
previous to the 4.7 release
These two are parallel now - unless you mean "the combination of
`wp_insert_post` and the additional field updates". In any case I think
we'd need to add a new set of actions/filters rather than moving the
existing ones again, now that they've shipped in a stable release.
> However, it does seem like there should be an action in create/update
that runs after the post and all fields are saved. It seems like that
would be more useful than an action that runs when the create/update is
"half" done.
We could structure this as a set of filters that operate on the API
response after a successful create/update.
@rachelbaker - your thoughts on the purpose of the current `rest_insert_*`
actions and possible next steps here would be helpful.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39345#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list