A WordPress-centric search engine for devs and theme authors



rest_insert_{$this->post_type} ›

Since4.7.0
Deprecatedn/a
do_action( "rest_insert_{$this->post_type}", $post, $request, true )
Parameters: (3)
  • (WP_Post) $post Inserted or updated post object.
    Required: Yes
  • (WP_REST_Request) $request Request object.
    Required: Yes
  • (bool) $creating True when creating a post, false when updating.
    Required: Yes
Defined at:
Codex:

Fires after a single post is created or updated via the REST API.

The dynamic portion of the hook name, $this->post_type, refers to the post type slug.





Source

do_action( "rest_insert_{$this->post_type}", $post, $request, true );