TypeCapabilities final readonly class
Minn\Auth\TypeCapabilities · public/minn/src/Minn/Auth/TypeCapabilities.php · 51 lines
The capability names a post type's permissions are built from. Posts and pages own their families (edit_posts, edit_others_pages, ...). Navigation menus fold every one of them onto edit_theme_options, which is why an editor may read a menu and only an administrator may change one; the reference's own registration says the same thing. A plugin's type answers with the names it registered.
Constants and properties
| private | FOLDED = array ( 'wp_navigation' => 'edit_theme_options', ) | Types whose whole cap family collapses to a single name. |
Public
| static | of(string $type, string $capability): string# | A cap name built from the post/page family, folded when the type folds, or the plugin type's own name for it (probe rest-plugin-caps). |
| static | create(string $type): string# | The capability creating a post of the type needs: the edit capability, or a plugin type's create_posts. |
| static | plural(string $type): string# | The capability stem of a type: pages for page, posts for everything else. |
| static | edit(string $type): string# | The edit capability of a type. |
| static | editOthers(string $type): string# | The edit-others capability of a type. |
| static | publish(string $type): string# | The publish capability of a type. |
| static | readPrivate(string $type): string# | The read-private capability of a type. |
Nothing matches.