WordPress 7.1 extends wp_get_abilities() with a standard way to filter registered abilities.

The function now accepts an optional $args array that can filter abilities by category, namespace, or metadata. It also supports callbacks for custom per-item filtering and final result processing.

Two new WordPress filters allow plugins to influence ability retrieval across the site:

wp_get_abilities_item_include wp_get_abilities_result

The REST API’s abilities list controller now uses wp_get_abilities() instead of implementing category filtering separately. It also supports filtering abilities by namespace.