Returns an array of all ability instances currently registered in the system.Use this for discovery, debugging, or building administrative interfaces. Example: // Prints information about all available abilities.
$abilities = wp_get_abilities();
foreach ( $abilities as $ability ) {
echo $ability->get_label() . ': ' . $ability->get_description() . "\n";
}
Return
WP_Ability[]
An array of registered WP_Ability instances. Returns an empty array if no abilities are registered or if the registry is unavailable.
Signature, return type and hooks compared across 3 parsed releases.
7.1.0
Parameter $args added.verified against source
6.9.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/abilities-api.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.