WP REST API: internals and customization

In this last part of our tutorial series on WP REST API, we will be looking at how the internals of the WP REST API work and modifying server responses for our default endpoints to contain custom fields.

Internal classes and methods of WP REST API

WP REST API has two main categories of classes, and those are endpoint and infrastructure classes. The endpoint classes cover the CRUD actions over resources like posts and comments that we overviewed in the last chapter. The infrastructure classes are covering classes that lie at the foundation of the API. In the following example, we will be looking at each of those two classes in detail.

The endpoint classes within the WP REST API are responsible for performing ...

Get Learning WordPress REST API now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.