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



delete_post_{$post->post_type} › WordPress Action Hooks

Since6.6.0
Deprecatedn/a
do_action( "delete_post_{$post->post_type}", $post_id, $post )
Parameters: (2)
  • () post_id Post ID.
    Required: Yes
  • () post Post object.
    Required: Yes
Defined at:
Codex:

Fires immediately before a post is deleted from the database.

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




Source

do_action( "delete_post_{$post->post_type}", $post_id, $post );