[wp-trac] [WordPress Trac] #45114: Fire publishing related hooks after all data is saved via the REST API.
WordPress Trac
noreply at wordpress.org
Fri Oct 16 03:32:28 UTC 2020
#45114: Fire publishing related hooks after all data is saved via the REST API.
-------------------------------------------------+-------------------------
Reporter: peterwilsoncc | Owner:
| peterwilsoncc
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.6
Component: REST API | Version:
Severity: normal | Resolution: fixed
Keywords: dev-feedback has-patch commit | Focuses:
needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):
* owner: (none) => peterwilsoncc
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"49172" 49172]:
{{{
#!CommitTicketReference repository="" revision="49172"
REST API, Posts: Add a hook to fire once a post, its terms and meta
update.
Introduces the action `wp_after_insert_post` inside a wrapper function of
the same name. This hook allows plugin developers to access a posts full
data (including its terms and meta data) regardless of the workflow used
to save it.
A new parameter is introduced to `wp_insert_post()` to indicate whether
the hook should be fired within the function call or will be fired
afterward.
Props aristath, Collizo4sky, danielbachhuber, joyously, kadamwhite,
kraftbj, markparnell, mikeschroder, noisysocks, peterwilsoncc,
SergeyBiryukov, talldanwp, thewebprincess, TimothyBlynJacobs.
Fixes #45114.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45114#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list