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
3230      wp_trash_post_comments( $post_id );
3231
3232      /**
3233       * Fires after a post is sent to the Trash.
3234       *
3235       * @since 2.9.0
3236       *
3237       * @param int $post_id Post ID.
3238       */
3239      do_action( 'trashed_post', $post_id );
3240
3241      return $post;
3242 }
3243
3244 /**
3245  * Restores a post from the Trash.
3246  *
3247  * @since 2.9.0
3248  * @since 5.6.0 An untrashed post is now returned to 'draft' status by default, except for