Software, Engineering, Development, and WordPress

Tag: WordPress REST API

Manipulate Incoming WordPress REST API Requests

As I’ve continued to work with integration mobile applications with the WordPress REST API, there have been a few instances in which I’ve wanted to inspect, manage, or manipulate incoming REST API Requests.

There’s a number of reasons you may want to manipulate incoming WordPress REST API requests before they actually begin interacting with the core application. In my case, I needed to determine:

  • which endpoint is being requested,
  • check whether or not a specific key is being bassed,
  • return an error if not or proceed with further processing.

But that’s one of many different possibilities available. What I’m more interested in, at least in this article, is showing how to manipulate a request before it’s actually sent to be processed.

Continue reading

WordPress REST API Example (One of Many)

With the second-half of the REST API merge confirmation coming to WordPress 4.7, it’s safe to say that there are going to be there clearly be more than one WordPress REST API example made available in the next few months.

Then again, there are examples that already exist because it’s possible to include the REST API in your project as a plugin, but I digress.

One of the neater, smaller examples that I’ve recently come across is by Brian Krogsgard.

WordPress REST API Example: By Brian Krogsgard

Not only does it show a WordPress REST API example, it shows how to use it in the context of a Rect applications.

Continue reading

© 2023 Tom McFarlin

Theme by Anders NorenUp ↑