WordPress Theme Review Team Votes to Allow Themes to Use the REST API Plugin

colored-pencils

During this week’s WordPress Theme Review Team meeting, members considered the possibility of allowing themes hosted in the directory to make use of the WP REST API plugin. Since the API is not yet included in core, any theme or plugin author who wants to use it must have the feature plugin installed.

Ordinarily, WordPress.org themes are not allowed to require a plugin on installation (although they can suggest one). As per the Theme Review Handbook on plugins: A theme can recommend plugins but not include those plugins in the theme code.

“The core team has asked us to consider temporarily allowing the requirement of the REST API for themes that may take advantage of it,” Tammie Lister said before calling for a vote. She also noted that waiving the rule would be temporary, as the API will soon be going into core.

“This does not open up the way for others as an exception because it’s a core feature,” she said.

The team took a quick vote and all present unanimously agreed to allow themes to require the REST API plugin as a temporary measure until it is available in core. Check out the meeting logs for the full discussion.

The WP REST API is already being used in production in many different ways around the web, as revealed in the comments on project leader Ryan McCue’s recent post calling for examples. If the Theme Review Team wants to keep pace with where WordPress is headed, it must offer the flexibility to allow for more innovative themes. Temporarily waiving the guideline against plugin requirements is a smart move.

As WordPress.org accrues more examples of themes that use the REST API in a way that complies with the review team’s high standards, developers who are just getting started will have strong examples for creating their own. Jack Lenox’s presentation at WordCamp London this year highlighted a few of the benefits of theming with the REST API:

  • Provides a way to retrieve pure data (usually in JSON or XML format) over HTTP
  • No loops necessary
  • Good for mobile apps and environments where you don’t want a full webpage to render but want content from a blog or site

With the official directory now welcoming these types of themes, it won’t be long before the entire landscape of WordPress theme development changes to support more modern ways of presenting content. Check out Jack Lenox’s presentation on Building themes with the WP REST API for information on how to get started.


LIKE THIS

14

14 responses to “WordPress Theme Review Team Votes to Allow Themes to Use the REST API Plugin”

  1. I generally agree with Josh above. Until core has a proper dependency system, these are dangerous waters to venture into. However, I believe this is a good move for several reasons, some to do with the REST API and others to do with making sure theme authors know that we’re open now (and have always been) to innovative ideas.

    Any theme authors using the plugin should at least warn users that they don’t know what the future holds.

    This is a temporary measure to see if we can get some more eyes on the REST API. The more people working with it, the better it’ll be and the more likely it’ll get pushed into core.

    As I’ve said elsewhere, I seriously doubt we’ll see many, if any, theme authors take advantage of this opportunity. There are a few reasons for this. Most of them don’t even know that much about the REST API. Only a fraction of them understand what this means for theme development. And, an even smaller percentage understand the documentation enough to use it.

    • Justin Tadlock said:

      “As I’ve said elsewhere, I seriously doubt we’ll see many, if any, theme authors take advantage of this opportunity. There are a few reasons for this. Most of them don’t even know that much about the REST API. Only a fraction of them understand what this means for theme development. And, an even smaller percentage understand the documentation enough to use it.”

      Well, doesn’t that kinda make an argument for the REST API *not* being in jammed into core? That is, if it’s going to be an esoteric / fringe tool then isn’t that the classic use case for “make it a plugin”?

      No doubt the REST API is fascinating and the future *for some.” But isn’t core already over-reaching its original intention(s)? For example, does that shortcodes plugin really belong in core? If one of the keys to the REST API is being focused and selective (?) about how you use WP, why is more and more being jammed into core?

      Shouldn’t core be moving toward lighter and faster, with the ability to “plug & play *only what you need* as you go”? Or at the very least perhaps there should be “classic” and “commercial” versions instead of still trying to force OSFA?

      • If plugin dependency handling becomes a reality, and included in core, this could move WordPress in the direction where modules are slowly removed from core.

        Should WordPress evolve against being a web or website(s) “operating system”, taking the role as a “kernel” with a lot of APIs and a minimal “shell” (admin), then it’s logical to include the REST API.

        On the other hand, if WordPress is to evolve further as primarily a CMS, and basically having an mature, excellent and maximum flexible admin shell and internal theme API, then external facing APIs should become plugins. And plugins depending on it and so forth.

        Currently both directions are open, and WordPress is moving at full speed in both directions. This may not be wise on a long term perspective. Some day a decision on the main direction has to be made.

        As long as plugin dependency handling is not in core, then I think, for the best of encouraging it’s use, is to get WP API into core as soon as possible. It may not only gain the development of new kinds of themes, but also “plugin apps” that live outside of WordPress itself (not loading WP), and even tailored administrative and content managing external applications. Plugin dependency handling may take a year or two. Then we can talk again.

      • Well, doesn’t that kinda make an argument for the REST API *not* being in jammed into core? That is, if it’s going to be an esoteric / fringe tool then isn’t that the classic use case for “make it a plugin”?

        As far as I’m concerned, I’m not arguing for inclusion or non-inclusion in any way. I’m simply talking in terms of what the Theme Review Team will most likely see. One of our fellow teams needs some help, and we’re happy to oblige, even if I don’t think it’ll do much to help.

        To answer the question though, no, that doesn’t make it a case of being plugin territory. It’s a huge ROI risk for theme authors to spend the time on something that’s not baked into core. It’ll always be a fringe tool for theme authors as a plugin because WP has no dependency system.

        Now, we can talk about WP’s lack of a dependency system, but the reality is that the REST API has been built. It could be years, if ever, before we see any sort of dependency system. Without either that or core inclusion, the REST API simply isn’t going to be utilized by many theme authors.

        If it’s in core, you’ll see a lot more themes using it in some fashion.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Discover more from WP Tavern

Subscribe now to keep reading and get access to the full archive.

Continue reading