- Article
- Intermediate
- 2 minutes read
- Reviewed August 4, 2026
- Advanced WordPress and integrations
WordPress exposes public APIs for common platform responsibilities.
These APIs provide stable contracts around data, permissions, extensibility and compatibility. Advanced development begins by identifying the correct platform abstraction before creating a custom one.
Core API Families
Important API families include:
- Hooks.
- Options, Settings and Transients.
- Metadata.
- Users, roles and capabilities.
- Post types and taxonomies.
- Rewrite and query APIs.
- HTTP API.
- REST API.
- Filesystem API.
- Media API.
- Cron API.
- Internationalization.
- Shortcodes and widgets.
- Block Editor APIs.
- Abilities API.
Public API vs Internal Function
A function existing in core does not automatically make it an appropriate extension point.
Prefer documented public functions, hooks and classes. Internal classes, private methods and database implementation details can change with less compatibility protection.
APIs Work Together
A custom REST endpoint might use:
- A registered post type.
- metadata schemas.
- capabilities.
- nonces or Application Passwords.
- validation callbacks.
- HTTP status responses.
- background tasks.
- internationalized error messages.
Security, performance and accessibility remain part of the API design.
Error Handling
WordPress commonly uses WP_Error to represent one or more errors.
Check return types before using values. Do not assume an API returned a valid ID, response or array.
Extending APIs
Plugins can register:
- Custom post types.
- REST routes.
- settings.
- block types.
- cron schedules.
- WP-CLI commands.
- abilities.
- custom hooks.
Each extension should document lifecycle, permissions, schemas and removal behavior.
Frequently Asked Questions
Must every WordPress integration use the REST API?
No. PHP hooks, the HTTP API, WP-CLI, cron and direct server-side APIs can be more appropriate depending on context.
Are undocumented core functions safe to use?
They can change unexpectedly. Use documented public APIs where possible.
Continue Learning
Previous: Options, Transients and Metadata APIs
Next: The WordPress REST API