Event Espresso and WordPress 5.0 Development

For anyone developing in the WordPress space, you should be well aware by now that WordPress 5.0 is bringing with it some pretty significant changes. Here at Event Espresso, we’ve been working hard to keep up with those changes and prepare our products for the future brought with those changes. In this post, I want to give a bit of an overview of what those changes mean for Event Espresso and how that might affect you as a developer working with our products.

In the short term, it’s important to highlight that nothing specific needs to be done for any Event Espresso customizations:

  • Currently, our editors are unaffected by the new WordPress editor. So any customizations in them (meta boxes, etc) will continue to work after the launch of WordPress 5.0
  • All our shortcodes continue to work in both the classic and new editor. The new editor has a shortcode block that can be used with shortcodes. One distinction, however, is that shortcodes exist on their own block. In most cases, that shouldn’t affect Event Espresso shortcode users too much because EE shortcodes tended to be their own distinct content pieces anyways.

So, in the short term at least, you can have a moment of relief! However, we do think there are some things you should be planning for and accounting for in the future.

Javascript and React

The new WordPress editor is javascript heavy. It goes without saying that unless you are familiar with javascript, you’re not going to have an easy time developing for the new editor. In keeping with the shift in WordPress towards more javascript heavy functionality, we have been leveling up our skills significantly in javascript and in particular, the new “blessed” javascript framework within the WordPress environment which is React. While you don’t need to be familiar with React in the post WordPress 5.0 world, understanding it greatly helps with developing complex things in the new editor and is definitely needed if you want to contribute to either the editor itself or things built for it. I’ve been fortunate to be able to contribute in different ways to the Gutenberg editor and can definitely say knowing react has made that easier.

What does this mean for Event Espresso?

  • We’ve switched our javascript development to a more modern process. This is surfaced in the implementation of a Webpack build process along with a more modular design.
  • For all new javascript in Event Espresso and our add-ons, we will be using react and/or the WordPress packages that help accomplish our goals.
  • Existing javascript in use in our products will still be maintained, but we will favor refactoring to newer javascript where and when we are able.

Extensibility (including shortcodes vs blocks )

As much as possible we are going to try to maintain parity with our existing extensible functionality in our products. However, there will be places where it is simply not possible to provide the same functionality in the move to more javascript heavy functionality. When that happens, we will communicate on this blog those cases.

An example where this will be happening in the short term is the introduction of Blocks in the new editor (vs. WordPress shortcodes). One of the significant features of the new WordPress editor is the introduction of the concept of Blocks. We’re “all-in” with this new feature which means:

  • We will no longer be adding new features to any of our current shortcodes. We’ll still do any bug fixes that may be needed, but none of our shortcodes (or their related templates) will have additional feature development.
  • We will keep existing shortcodes in our products for as long as WordPress supports them.
  • We are not introducing 1:1 parity with our existing shortcodes when introducing new blocks with similar functionality. Blocks (such as the Event Attendees block) will exist entirely on their own and the layout, styling etc is not inherited from the equivalent shortcode.

Going forward, we’re iterating on and developing blocks for the new editor because we believe the user interface and experience is much greater than that of the WordPress shortcodes.

Practically, this means for you, the WordPress developer:

  • If you are already using the extensibility in existing templates for the current shortcodes, you can continue to do so going forward (especially since the new editor does support WordPress shortcodes).
  • Initially, the extensibility on the new blocks will be limited (styles will be controlled via CSS, etc.) until we get a handle on what kind of extensibility is needed by our developer users (which includes ourselves!). So we do plan on having extensible blocks, but the shape of that is still yet to be determined. What we can tell you, is that its very likely all extensibility for our blocks will be javascript only. In other words, it’s unlikely templates will be modifiable PHP side (we’re open to feedback on that over time).
  • With that said, we do have a PHP framework built for more easily registering new blocks PHP side (more on that in the documentation section).

Documentation

As a part of our work over the past year, we have taken pains to document new systems and functionality. You can read the fruits of that here. In particular, there’s a LOT of new documentation related to javascript and soon some documentation on the blocks framework for registering PHP blocks.

As always, documentation is an ongoing effort and we appreciate any feedback you have to where we can improve.

The future

In the coming year we currently have planned (among other things):

  • Recurring Events Manager — an add-on which allows for easily managing recurring events which are predominately written in react.
  • Releasing more blocks for the new editor.
  • Beginning the work on refactoring our own editors to work similarly to the new WordPress editor except they’ll be more Event centric (vs. post-centric).

Leave a Reply

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