public) || current_user_can('read_post', $postId) || current_user_can('edit_post', $postId); } /** 本文・メタ値などの中身を見せてよいか。パスワード保護された投稿は、編集権限も必要。 */ public static function canViewContent(int $postId): bool { $post = get_post($postId); if (!$post || !self::canRead($postId)) { return false; } return $post->post_password === '' || current_user_can('edit_post', $postId); } }