[wp-trac] [WordPress Trac] #42864: REST API: Fire an action after items are completely inserted/updated
WordPress Trac
noreply at wordpress.org
Sat Oct 13 17:32:48 UTC 2018
#42864: REST API: Fire an action after items are completely inserted/updated
--------------------------+--------------------------------
Reporter: pento | Owner: timothyblynjacobs
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.0
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: rest-api
--------------------------+--------------------------------
Changes (by TimothyBlynJacobs):
* keywords: => has-patch
Comment:
Added a patch. I went with `rest_after_*` because it seemed more inline
with other hooks like `wp_delete_post()` which fires `after_delete_post`
at the end. The other style I saw some examples of was something like
`rest_inserted_*` Thoughts?
When working on the attachments hook, I saw that the
`rest_insert_attachment` hook passes the request data as an array for the
attachment instead of the actual `WP_Post` object. Is it too late to fix
that? Should it be a separate ticket?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42864#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list