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
3583      wp_trash_post_comments( $post_id );
3584
3585      /**
3586       * Fires after a post is sent to the Trash.
3587       *
3588       * @since 2.9.0
3589       *
3590       * @param int $post_id Post ID.
3591       */
3592      do_action( 'trashed_post', $post_id );
3593
3594      return $post;
3595 }
3596
3597 /**
3598  * Restores a post from the Trash.
3599  *
3600  * @since 2.9.0
3601  * @since 5.6.0 An untrashed post is now returned to 'draft' status by default, except for