untrash_post

untrash_post

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

See hook in core

Displaying hooks found in version: wordpress-6.5.4

do_action('untrash_post') is found 1 times:

  • /wp-includes/post.php line 3775
    	 *
    	 * @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: