Returns an array of all ability category instances currently registered in the system.Use this for discovery, debugging, or building administrative interfaces. Example: // Prints information about all available ability categories.
$ability_categories = wp_get_ability_categories();
foreach ( $ability_categories as $ability_category ) {
echo $ability_category->get_label() . ': ' . $ability_category->get_description() . "\n";
}
Return
WP_Ability_Category[]
An array of registered ability category instances. Returns an empty array if no ability categories are registered or if the registry is unavailable.
Signature, return type and hooks compared across 3 parsed releases.
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.