Note: This command is not part of a stable WP-CLI release yet. To use it now, switch to the nightly build with wp cli update --nightly. If you installed the command as a separate package, updating that package may be enough.
The Abilities API, introduced in WordPress 6.9, uses categories to organize related abilities for better discoverability.
Examples
# List all registered ability categories.
$ wp ability category list
+------+-------+-----------------------------------------------------+
| slug | label | description |
+------+-------+-----------------------------------------------------+
| site | Site | Abilities that retrieve or modify site information. |
| user | User | Abilities that retrieve or modify user information. |
+------+-------+-----------------------------------------------------+
# Get details of a specific category.
$ wp ability category get site
+-------------+-----------------------------------------------------+
| Field | Value |
+-------------+-----------------------------------------------------+
| slug | site |
| label | Site |
| description | Abilities that retrieve or modify site information. |
| meta | {} |
+-------------+-----------------------------------------------------+
# Check if a category exists.
$ wp ability category exists site
$ echo $?
0
Subcommands
| Name | Description |
|---|---|
| wp ability category exists | Checks whether an ability category is registered. |
| wp ability category get | Gets details about a registered ability category. |
| wp ability category list | Lists all registered ability categories. |