Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: trashed_post

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
3399      wp_trash_post_comments( $post_id );
3400
3401      /**
3402       * Fires after a post is sent to the Trash.
3403       *
3404       * @since 2.9.0
3405       *
3406       * @param int $post_id Post ID.
3407       */
3408      do_action( 'trashed_post', $post_id );
3409
3410      return $post;
3411 }
3412
3413 /**
3414  * Restores a post from the Trash.
3415  *
3416  * @since 2.9.0
3417  * @since 5.6.0 An untrashed post is now returned to 'draft' status by default, except for