What problem does it solve?
This Skill streamlines the process of working with the WordPress Abilities API, ensuring that abilities and their categories are correctly registered, exposed via the REST API, and accessible to clients. It helps debug issues where abilities are not showing up or are inaccessible.
Core Features & Use Cases
- Ability Registration: Define and register custom abilities and categories in PHP.
- REST API Exposure: Configure abilities to be visible through the
/wp-json/wp-abilities/v1/ endpoints.
- Client-Side Consumption: Integrate with
@wordpress/abilities for frontend checks and logic.
- Debugging: Diagnose and resolve "ability not found" or "client can't see ability" issues.
- Use Case: When developing a new feature that requires granular user permissions, you can use this skill to register a new ability like 'edit_custom_post_type' and ensure it's available to the frontend JavaScript for conditional UI rendering.
Quick Start
Use the wp-abilities-api skill to register a new ability category named 'my-plugin' with the label 'My Plugin'.