Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

WordPress hook directory
before_delete_post

Description

Runs when a post or page is about to be deleted. Comments, attachments and metadata are still available. Action function arguments: post or page ID.

This description was scraped automatically from the WordPress filter reference or action reference. If it looks like this is the wrong description, please tell me so I can fix my code.

WordPress version history for before_delete_post

This database has information for all major versions from WP 1.2.1 through 6.2.

Version File Line Type
3.2 wp-includes/post.php 1986 View in context action
3.3 wp-includes/post.php 1978 View in context action
3.4 wp-includes/post.php 2034 View in context action
3.5 wp-includes/post.php 2317 View in context action
3.6 wp-includes/post.php 2245 View in context action
3.7 wp-includes/post.php 2302 View in context action
3.8 wp-includes/post.php 2306 View in context action
3.9 wp-includes/post.php 2441 View in context action
4.0 wp-includes/post.php 2587 View in context action
4.1 wp-includes/post.php 2587 View in context action
4.2 wp-includes/post.php 2606 View in context action
4.3 wp-includes/post.php 2636 View in context action
4.4 wp-includes/post.php 2394 View in context action
4.5 wp-includes/post.php 2511 View in context action
4.6 wp-includes/post.php 2366 View in context action
4.7 wp-includes/post.php 2460 View in context action
4.8 wp-includes/post.php 2460 View in context action
4.9 wp-includes/post.php 2498 View in context action
5.0 wp-includes/post.php 2657 View in context action
5.1 wp-includes/post.php 2814 View in context action
5.2 wp-includes/post.php 2814 View in context action
5.3 wp-includes/post.php 2975 View in context action
5.4 wp-includes/post.php 2986 View in context action
5.5 wp-includes/post.php 3026 View in context action
5.6 wp-includes/post.php 3038 View in context action
5.7 wp-includes/post.php 3125 View in context action
5.8 wp-includes/post.php 3207 View in context action
5.9 wp-includes/post.php 3408 View in context action
6.0 wp-includes/post.php 3391 View in context action
6.1 wp-includes/post.php 3407 View in context action
6.2 wp-includes/post.php 3409 View in context action

Related Hooks

We find related hooks using word stems. before_delete_post has 3 significant word stem(s): before, delete, post. Note that some of the hooks below may not appear in all versions of WP.