Fires when a post is transitioned from one status to another.
Description
The dynamic portions of the hook name, $new_status and $old_status, refer to the old and new post statuses, respectively. Possible hook names include: <ul> <li>draft_to_publish</li> <li>publish_to_trash</li> <li>pending_to_draft</li> </ul>
5837*-`pending_to_draft`5838*5839* @since 2.3.05840*5841* @param WP_Post$post Post object.5842*/5843do_action("{$old_status}_to_{$new_status}",$post);58445845/**5846* Fires when a post is transitioned from one status to another.5847*5848* The dynamic portions of the hook name,`$new_status`and`$post->post_type`,5849* refer to the newpost status and post type, respectively.
History
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.