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.2

do_action('untrash_post') is found 1 times:

  • /wp-includes/post.php line 4007
    4003
    4004
    4005
    4006
    4007
    4008
    4009
    4010
    4011
    4012
    4013
    *
     * @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: