WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
событие не описано

delete_post хук-событие . WP 1.2.0

Fires immediately before a post is deleted from the database.

Использование

add_action( 'delete_post', 'action_function_name_4270', 10, 2 );
function action_function_name_4270( $postid, $post ){
	// action...
}
$postid(число)
Post ID.
$post(WP_Post)
Post object.

Список изменений

С версии 1.2.0 Введена.
С версии 5.5.0 Added the $post parameter.

Где вызывается хук

wp_delete_post()
delete_post
wp_delete_attachment()
delete_post
wp-includes/post.php 3078
do_action( 'delete_post', $postid, $post );
wp-includes/post.php 5838
do_action( 'delete_post', $post_id, $post );

Где используется хук в ядре WordPress

wp-includes/default-filters.php 383
add_action( 'delete_post', '_wp_delete_post_menu_item' );
wp-includes/default-filters.php 386
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
wp-includes/default-filters.php 478
add_action( 'delete_post', 'delete_get_calendar_cache' );
wp-includes/ms-default-filters.php 79
add_action( 'delete_post', '_update_posts_count_on_delete' );
wp-includes/ms-default-filters.php 80
add_action( 'delete_post', '_update_blog_date_on_post_delete' );
wp-includes/nav-menu.php 1136
remove_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
wp-includes/nav-menu.php 1148
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );