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>
5838*-`pending_to_draft`5839*5840* @since 2.3.05841*5842* @param WP_Post$post Post object.5843*/5844do_action("{$old_status}_to_{$new_status}",$post);58455846/**5847* Fires when a post is transitioned from one status to another.5848*5849* The dynamic portions of the hook name,`$new_status`and`$post->post_type`,5850* refer to the newpost status and post type, respectively.
History
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.