-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
[Priority] HighEssential focuses for workEssential focuses for work[Status] In ProgressAssigned work scheduledAssigned work scheduled
Milestone
Description
Figure out how to filter correctly all abilities when fetching them, given the expected high number of registered items by core and plugins.
Currently, it's only possible to find a single item or fetch all of them:
// Retrieving all abilities.
$abilities = wp_get_abilities();
// Retrieving a specific ability.
$ability = wp_get_ability( 'example/add-numbers' );The same applies to the REST API, which offers WP_REST_Abilities_List_Controller that handles listing abilities and retrieving individual abilities:
- GET
/wp-json/wp/v2/abilities– list all registered abilities. - GET
/wp-json/wp/v2/abilities/{name}– Get a specific ability by name.
Let's discuss possible approaches. For reference, the WP Feature API prototype offers a special WP_Feature_Query object that offers several filtering options:
Metadata
Metadata
Assignees
Labels
[Priority] HighEssential focuses for workEssential focuses for work[Status] In ProgressAssigned work scheduledAssigned work scheduled
Type
Projects
Status
In progress