Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: delete_post_{$post->post_type}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3813       *
3814       * The dynamic portion of the hook name, `$post->post_type`, refers to
3815       * the post type slug.
3816       *
3817       * @since 6.6.0
3818       *
3819       * @param int     $post_id Post ID.
3820       * @param WP_Post $post    Post object.
3821       */
3822      do_action( "delete_post_{$post->post_type}", $post_id, $post );
3823
3824      /**
3825       * Fires immediately before a post is deleted from the database.
3826       *
3827       * @since 1.2.0
3828       * @since 5.5.0 Added the `$post` parameter.
3829       *
3830       * @param int     $post_id Post ID.
3831       * @param WP_Post $post    Post object.