public static function handle_post_transition($new_status, $old_status, $post) { if (!in_array('publish', array($old_status, $new_status))) { return; } $public_post_types = get_post_types(array('public' => true)); if (!in_array($post->post_type, $public_post_types)) { return; } if (self::is_locked($post->post_type)) { return; } self::set_lock($post->post_type); do_action('wpcom_vip_bump_lastpostmodified', $post); }