正如@Pieter所说,您可以使用transition_post_status
:
function wpse_187997_job_status( $new_status, $old_status, $post ) {
if ( $post->post_type === \'job\' && $new_status !== $old_status ) {
// Post type "job" and status has changed
}
}
add_action( \'transition_post_status\', \'wpse_187997_job_status\', 10, 3 );