This Claude Code skill equips AI coding assistants with expert-level capabilities to create, modify, and optimize WordPress REST API endpoints. It guides developers and agents through registering custom routes using WP_REST_Controller, implementing rigorous schema and argument validation, securing endpoints with precise permission callbacks, and exposing Custom Post Types (CPTs) or taxonomies safely. Perfect for developers building headless WordPress applications, custom plugins, or interactive block-editor integrations, this skill ensures adherence to modern WordPress Core development standards, minimizing common routing, security, and authentication pitfalls.
主要功能
01Controller-based endpoint organization using custom WP_REST_Controller classes
02JSON Schema-driven request argument validation and sanitization
033 GitHub stars
04Robust cookie-based (nonce) and application password authentication configuration
05Safe route registration using proper namespaces, HTTP methods, and permission callbacks
06Seamless exposure of Custom Post Types (CPTs), taxonomies, and custom meta fields
使用场景
01Creating custom endpoints for mobile apps or headless frontend frameworks like Next.js
02Debugging 401 Unauthorized or 403 Forbidden REST API errors in a WordPress plugin
03Exposing Custom Post Types and post meta to the Block Editor (Gutenberg)