A WordPress-centric search engine for devs and theme authors



{$old_status}_to_{$new_status} ›

Since2.3.0
Deprecatedn/a
do_action( "{$old_status}_to_{$new_status}", $post )
Parameters:
  • (WP_Post) $post Post object.
    Required: Yes
Defined at:
Codex:

Fires when a post is transitioned from one status to another.

The dynamic portions of the hook name, $new_status and $old status, refer to the old and new post statuses, respectively.





Source

do_action( "{$old_status}_to_{$new_status}", $post );