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>
5934*-`pending_to_draft`5935*5936* @since 2.3.05937*5938* @param WP_Post$post Post object.5939*/5940do_action("{$old_status}_to_{$new_status}",$post);59415942/**5943* Fires when a post is transitioned from one status to another.5944*5945* The dynamic portions of the hook name,`$new_status`and`$post->post_type`,5946* refer to the newpost status and post type, respectively.
History
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.