CAll Us: +1 888-999-8231 Submit Ticket

Why Are WordPress Developers So Excited About The New Content API Endpoints?

EndpointsWordPress 4.7 introduced many new features and enhancements. Users are most likely to be interested in the Customizer enhancements or the ability to quickly activate starter content for new themes. But it’s the inclusion of new content API endpoints that has developers talking. While the new endpoints don’t directly change the experience of WordPress users, they will enrich WordPress ecosystem.

First, what’s an API? API stands for Application Program Interface. That sounds complex, but an API is just a way to interact with a piece of software from the outside. In this case, we’re talking about a REST API, which can thought of as a set of URLs. When you send a request to the API using a URL — which is basically a web address — you’re telling WordPress that you want it to do something.

When you or I visit a page on a WordPress site, we click on a web address and WordPress sends back a web page that our browser displays. The REST API works in the same way, but it exposes much more functionality than a standard web address. For example, the URL may instruct WordPress to create a new post.

Until recently, using the rich functionality of WordPress from an external application was difficult and inflexible. The API makes it simple to do almost anything that can be done in the admin interface from an external application. It’s possible to write an entirely new admin interface that isn’t tightly coupled to WordPress’s technology stack. Any application that can send an HTTP request (and has the right authentication) can interact with any WordPress site.

For developers, this is liberating. They can use their favorite programming languages and frameworks to create rich interactive experiences while benefiting from all the battle-tested content management functionality WordPress brings to the table.

I’ve been talking about how WordPress applications can use the API, but it’s important to understand that by application I mean any piece of software that interacts with WordPress, including plugins, themes, mobile apps, text editors, and much more.

A couple of years ago, when Matt Mullenweg said, “Learn JavaScript, deeply,” this is what he was getting at. JavaScript is the primary language of front-end web development. It’s the only programming language that runs natively in the browser, and the WordPress REST API allows developers to hook their JavaScript front-end applications directly into WordPress.

Until the merging of the REST API, theme developers had to build themes in PHP that were tightly coupled to the hooks and functions that WordPress exposes. It was the same for plugin developers. The REST API changes all that and heralds big things for the future of the WordPress ecosystem.

Posted in:
Content, WordPress

Source link

About the Author

Leave a Reply