wp_trash_post


wp_trash_post ( $post_id = 0 )

Parameters:
  • (int) post_id Optional. Post ID. Default is ID of the global $post if EMPTY_TRASH_DAYS equals true.
See:
Returns:
  • (WP_Post|bool|null) Post data on success, false or null on failure.
Defined at:

Description

Move a post or page to the TrashIf Trash is disabled, the post or page is permanently deleted.

Related Functions

wp_untrash_post, wp_ajax_trash_post, wp_ajax_untrash_post, wp_trash_post_comments, wp_kses_post

Top Google Results

User discussions

wpseek mobile