wp-rest-api
Installation
SKILL.md
WP REST API & Abilities API
Route Registration
Register routes on the rest_api_init hook using register_rest_route(). A route is the URL pattern; an endpoint is the method + callback bound to that route. For non-trivial endpoints, extend WP_REST_Controller for a structured CRUD pattern with built-in schema wiring.
Namespacing rules
- Always use a unique namespace:
vendor/v1(e.g.myplugin/v1). - Never use
wp/*unless contributing to WordPress core. - For non-pretty permalinks, routes are accessed via
?rest_route=/namespace/route.