private function is_draft_or_pending($post) { if (empty($post->post_status)) { return false; } return in_array($post->post_status, ['draft', 'pending', 'auto-draft'], true); }