untrash_post

untrash_post

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('untrash_post') is found 1 times:

  • /wp-includes/post.php line 4007
    	 *
    	 * @param int    $post_id         Post ID.
    	 * @param string $previous_status The status of the post at the point where it was trashed.
    	 */
    	do_action( 'untrash_post', $post_id, $previous_status );
    
    	$new_status = ( 'attachment' === $post->post_type ) ? 'inherit' : 'draft';
    
    	/**
    	 * Filters the status that a post gets assigned when it is restored from the trash (untrashed).
    	 *
    

See this hook used in plugins: