Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

WordPress hook directory
wp_trash_post

Description

Runs when a post or page is about to be trashed. 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 wp_trash_post

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

Version File Line Type
3.3 wp-includes/post.php 2078 View in context action
3.4 wp-includes/post.php 2124 View in context action
3.5 wp-includes/post.php 2407 View in context action
3.6 wp-includes/post.php 2335 View in context action
3.7 wp-includes/post.php 2406 View in context action
3.8 wp-includes/post.php 2413 View in context action
3.9 wp-includes/post.php 2578 View in context action
4.0 wp-includes/post.php 2728 View in context action
4.1 wp-includes/post.php 2728 View in context action
4.2 wp-includes/post.php 2745 View in context action
4.3 wp-includes/post.php 2775 View in context action
4.4 wp-includes/post.php 2538 View in context action
4.5 wp-includes/post.php 2656 View in context action
4.6 wp-includes/post.php 2511 View in context action
4.7 wp-includes/post.php 2605 View in context action
4.7 wp-includes/theme.php 2874 View in context action
4.8 wp-includes/post.php 2605 View in context action
4.8 wp-includes/theme.php 2895 View in context action
4.9 wp-includes/class-wp-customize-manager.php 2947 View in context action
4.9 wp-includes/post.php 2661 View in context action
5.0 wp-includes/class-wp-customize-manager.php 2954 View in context action
5.0 wp-includes/post.php 2820 View in context action
5.1 wp-includes/class-wp-customize-manager.php 2996 View in context action
5.1 wp-includes/post.php 2980 View in context action

Related Hooks

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