diff --git a/src/Integrations/WordPress/PostGuard.php b/src/Integrations/WordPress/PostGuard.php index a0bd418..e890942 100644 --- a/src/Integrations/WordPress/PostGuard.php +++ b/src/Integrations/WordPress/PostGuard.php @@ -136,15 +136,6 @@ final class PostGuard * so a plain `object` return type is accurate and still lets callers branch with * `is_wp_error()` / `instanceof WP_Error`, exactly like editable() above. */ - /** The answer for a post type that is not available to the tools – the same for unknown and excluded ones. */ - public static function unavailableType(string $name): WP_Error - { - return Errors::notFound( - sprintf('Inhaltstyp "%s" ist nicht verfügbar.', $name), - 'Verfügbare Inhaltstypen über lit/content-types (direkt: lit-content-types) abrufen.' - ); - } - public static function postType(mixed $postType, ContentSchema $schema, string $cap): object { $name = is_string($postType) ? $postType : ''; @@ -161,6 +152,15 @@ final class PostGuard return $object; } + /** The answer for a post type that is not available to the tools – the same for unknown and excluded ones. */ + public static function unavailableType(string $name): WP_Error + { + return Errors::notFound( + sprintf('Inhaltstyp "%s" ist nicht verfügbar.', $name), + 'Verfügbare Inhaltstypen über lit/content-types (direkt: lit-content-types) abrufen.' + ); + } + /** * Whether a list/search query for this post type must stay restricted to the current * user's own entries because they lack edit_others_posts. Filtering per row after the