Home/Hooks/after_delete_post
ACTION

after_delete_post

Fires after a post is deleted, at the conclusion of wp_delete_post().

wp-includes/post.php
Line 3885
2 Parameters
View Source

Usage

add_action( 'after_delete_post', 'your_callback_function', 10, 2 );

Action Callback:

function your_callback_function( $post_id, $post ) {
    // Your code here
    
}

Parameters

$post_id

Parameter 1

$post

Parameter 2

⚡ Action Hook

Action hooks allow you to insert custom code at specific points during WordPress execution. Actions do not return any values.