WordPress hook directory
delete_post

Description

Runs when a post or page is about to be deleted. Comments, attachments and metadata are already deleted. 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 delete_post

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

Version File Line Type
1.2.1 wp-admin/post.php 929 View in context action
1.5.2 wp-admin/post.php 470 View in context action
2.0 wp-includes/functions-post.php 538 View in context action
2.0.11 wp-includes/functions-post.php 546 View in context action
2.1 wp-includes/post.php 414 View in context action
2.2 wp-includes/post.php 407 View in context action
2.3 wp-includes/post.php 515 View in context action
2.5 wp-includes/post.php 975 View in context action
2.6 wp-includes/post.php 1032 View in context action
2.7 wp-includes/post.php 1105 View in context action
2.8 wp-includes/post.php 1146 View in context action
2.9 wp-includes/post.php 1184 View in context action
2.9 wp-includes/post.php 1239 View in context action
2.9 wp-includes/post.php 2875 View in context action
3.0 wp-includes/post.php 1728 View in context action
3.0 wp-includes/post.php 1783 View in context action
3.0 wp-includes/post.php 3481 View in context action
3.1 wp-includes/post.php 1955 View in context action
3.1 wp-includes/post.php 2010 View in context action
3.1 wp-includes/post.php 3723 View in context action
3.2 wp-includes/post.php 2041 View in context action
3.2 wp-includes/post.php 3808 View in context action
3.3 wp-includes/post.php 2033 View in context action
3.3 wp-includes/post.php 3805 View in context action
3.4 wp-includes/post.php 2083 View in context action
3.4 wp-includes/post.php 3850 View in context action
3.5 wp-includes/post.php 2366 View in context action
3.5 wp-includes/post.php 4106 View in context action
3.6 wp-includes/post.php 2294 View in context action
3.6 wp-includes/post.php 4087 View in context action
3.7 wp-includes/post.php 2337 View in context action
3.7 wp-includes/post.php 4183 View in context action
3.8 wp-includes/post.php 2341 View in context action
3.8 wp-includes/post.php 4190 View in context action
3.9 wp-includes/post.php 2483 View in context action
3.9 wp-includes/post.php 4671 View in context action
4.0 wp-includes/post.php 2629 View in context action
4.0 wp-includes/post.php 4802 View in context action
4.1 wp-includes/post.php 2629 View in context action
4.1 wp-includes/post.php 4800 View in context action
4.2 wp-includes/post.php 2648 View in context action
4.2 wp-includes/post.php 4848 View in context action
4.3 wp-includes/post.php 2678 View in context action
4.3 wp-includes/post.php 4926 View in context action
4.4 wp-includes/post.php 2441 View in context action
4.4 wp-includes/post.php 4739 View in context action
4.5 wp-includes/post.php 2559 View in context action
4.5 wp-includes/post.php 4890 View in context action
4.6 wp-includes/post.php 2414 View in context action
4.6 wp-includes/post.php 4792 View in context action
4.7 wp-includes/post.php 2508 View in context action
4.7 wp-includes/post.php 4909 View in context action
4.8 wp-includes/post.php 2508 View in context action
4.8 wp-includes/post.php 4914 View in context action
4.9 wp-includes/post.php 2546 View in context action
4.9 wp-includes/post.php 4992 View in context action
5.0 wp-includes/post.php 2705 View in context action
5.0 wp-includes/post.php 5162 View in context action
5.1 wp-includes/post.php 2864 View in context action
5.1 wp-includes/post.php 5442 View in context action

Related Hooks

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