Glossary Term
wp_delete_post()
wp_delete_post() — Trashes or deletes a post or page. When the post and page is permanently deleted, everything that is tied to it is deleted also. This includes comments, post meta fields, and terms associated with the post. The post or page is moved to Trash instead of permanently deleted unless Trash is disabled, item is already in the Trash, or $force_delete is true.
Inputs: $post_id (int): Post ID. (The default of 0 is for historical reasons; providing it is incorrect.) $force_delete (bool): Optional. Whether to bypass Trash and force deletion. Default false.
Returns WP_Post|false|null: Post data on success, false or null on failure.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
