WordPress almost had a special UI for handling shortcodes

Jul 8, 2015 12:22 GMT  ·  By

Before WordPress 4.3 Beta was released, we were writing about a set of possible new features the dev team was considering for the upcoming version.

While most were included with the first beta of the 4.3 branch, the most notable feature left out was one regarding an improved method of handling shortcodes.

This feature would allow users to preview a shortcode's output right inside the WordPress WYSIWYG backend editor, instead of displaying it like a jumbled text and having to go to the frontend every time the user would want to view its output.

Because the WordPress team has a habit of implementing core features as plugins, or grabbing plugins and integrating them into the core, this particular feature the team was discussing resides in the Shortcake plugin, which anyone can grab and play around with.

This plugin provides an improvement in the overall editing user experience (UX) and allows users to make content and layout-based corrections to a few types of shortcodes, without having to waste time waiting for a page preview to load, or for the page to be saved and reloaded on the frontend.

We might see a new button at the top of the WordPress WYSIWYG editor

The feature is similar to what the WordPress team changed in the media embedding process, simplifying the whole procedure and supporting automatic embeds from various providers.

The WordPress dev team is still discussing how to implement the Shortcake UI inside the WordPress native UI, currently pondering the option of adding an "Add Post Element" button alongside "Add Media."

Additionally, they're also considering whether to include default examples, or if to enable inline editing for the shortcode's preview.

As of now, this feature is not expected in 4.3, but the proposal wasn't removed from the WordPress project tracker, so there are still chances we might see it in 4.4 or subsequent versions.

The official Shortcake plugin has a special page on the WordPress Plugins repository where you can grab it, or you can install it via the WordPress built-in plugin manager. Before you go on and test it, remember to read the usage instructions provided on its GitHub wiki page.

Shortcake allows users to preview shortcodes inside the WordPress editor
Shortcake allows users to preview shortcodes inside the WordPress editor

Shortcake WordPress plugin (3 Images)

New elements can be added to a post via an Add Media popup
These new elements are actually shortcodesShortcake allows users to preview shortcodes inside the WordPress editor
Open gallery