Basic Idea About WordPress REST API - SkillBakery Studios


Post Top Ad

Post Top Ad

Wednesday, December 9, 2020

Basic Idea About WordPress REST API

 The WordPress REST API was developed in response to changes in the way websites and apps are developed and a need to open up WordPress more widely. The WordPress REST API was released as part of core in version 4.7 in December 2016, but it was around as a plugin before then. It’s designed to support a range of applications built on WordPress and to transform WordPress from a content management system to an application platform. It’s used extensively by, whose JavaScript-based interface uses the REST API to interface with the WordPress database. It’s also used by the Gutenberg editing interface, which became part of core in 2019.The REST API widens the range of applications that WordPress can be used for. While a content management system excels at running a complex website, an application platform can also be used to power web-based single-page applications or SPAs (if you’ve ever used Google docs, you’ve used one of those).In these, the content is refreshed when the user takes action, instead of loading new pages. Because it uses JavaScript (a client-side language) instead of PHP (a server-side language), it can make things happen in the user’s browser without having to constantly send requests to the server.

Implications for WordPress Users and Developers

If you’re a user and/or developer working with WordPress, the REST API has a number of implications.

For users, these include:

  • Changes to the interface, including the Gutenberg editor.
  • Changes and improvements to the WordPress mobile app.
  • Self-hosted WordPress admin screens looking more like screens over time.

For developers, there are wider implications and possibilities:

  • The ability to create SPAs using the REST API, pulling data in from WordPress but looking very different from WordPress.
  • The ability to integrate WordPress with other frontend technologies and systems.
  • The ability to develop with WordPress if you’re a frontend developer who doesn’t write PHP.
  • For PHP developers, an increasing need to expand your skills to include JavaScript.
  • Specific changes such as the need to build Gutenberg blocks instead of meta boxes in page and post editing screens.

Over time, the WordPress REST API will mean that more of WordPress core will be written in JavaScript and not PHP. If you’re a WordPress developer, this means you will need to learn JavaScript.

No comments:

Post a Comment

Post Top Ad