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 5.1.

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

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.