wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_delete_{$this->post_type} › WordPress Action Hooks

Since4.7.0
Deprecatedn/a
do_action( "rest_delete_{$this->post_type}", $post, $response, $request )
Parameters: (3)
  • (WP_Post) $post The deleted or trashed post.
    Required: Yes
  • (WP_REST_Response) $response The response data.
    Required: Yes
  • (WP_REST_Request) $request The request sent to the API.
    Required: Yes
Defined at:
Codex:

Fires immediately after a single post is deleted or trashed via the REST API.

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

Possible hook names include:

  • rest_delete_post
  • rest_delete_page
  • rest_delete_attachment




Source

do_action( "rest_delete_{$this->post_type}", $post, $response, $request );