We are just about two months from the release of WordPress 4.4, but it’s already shaping up to be a very exciting release. A lot of stuff is happening.
When I say a lot of stuff, I mean a lot of stuff:
only 7 releases have had > 1500 commits, each took 4-5 months to get there. 4.4 has done it in only 2 months, with almost 2 months to go.
— Scott Taylor (@wonderboymusic) October 17, 2015
Let’s get into what you can expect from WordPress 4.4.
A Little Bit Of REST API
The infrastructure for the REST API has been merged into WordPress core, and will be used to create REST APIs using WordPress.
With these tools in place you can use them to create your own RESTful API routes and endpoints. This is excellent news for those who use WordPress as a service provider — serving content over a custom REST API. It also provides a replacement for the misuse of the admin ajax API.
In WordPress 4.5 we should see this infrastructure used to power the default routes, which provide basic CRUD for the four main WordPress objects — posts, users, comments and taxonomy terms, which will continue to live and evolve in the plugin for now. How the core default routes evolve past 4.5 is yet to be determined, but I’m excited by the possibilities.
For more information on this, check out this free ebook I wrote on the WP REST API.
There are a lot of reasons why WordPress is so successful, but flexibility and extensibility are definitely at the top of that list. One of the things that makes WordPress applicable to so many use cases is that there is no structure to the posts or user metadata. The post and user database tables have a specific set of columns, limiting what data can be stored in that table.
The post and user metadata tables do not use one row per post or one row per user. Instead, they use one row for metadata, which means that any post or user can have any meta field in any combination.
If the post, user, and comment metadata tables had a set structure, then we wouldn’t have the variety of plugins, themes, and rapid innovation around the same simple structure we have today.
Notice that I have only talked about users, posts, and comments, not taxonomy terms. WordPress 4.4 begins a process of changing that. This release introduces a term meta table and the API enhancements to use it.
WordPress Post oEmbeds
One of my favorite features about WordPress is oEmbeds. When I first started blogging with WordPress embedding a YouTube video or an mp3 was a hassle. Now all I do is paste the link in and it embeds magically using the oEmbed standard to automatically, and securely, embed the content. It’s a little thing, but it saves a lot of time and makes for a better user experience for your site’s visitors.
The list of oEmbed providers includes YouTube, SoundCloud, and many other great services for publishing content, but not WordPress, until now. With WordPress 4.4 you can now embed a WordPress post in a WordPress post by dropping a link into the post editor. Queue the xzibit, “I heard you like…” memes
What Else Could Happen
All of this is confirmed, but we’re also excited about a few things that are rumored to happen.
The first is improvements to the HTTP API. The WordPress HTTP API is the set of tools we use to make requests from inside WordPress to other sites and APIs, including REST APIs. One major shortcoming of PHP is that it is serial. It executes one thing at a time. This is a major issue when you need data from multiple remote sources, as you have to wait for each request to happen, one after another.
There are a lot of helper libraries out there for parallel HTTP requests. One open ticket for 4.4 proposes adding parallel HTTP requests to the WordPress REST API. This could lead to a major performance improvement for core. In addition, it would mean less usage of third-party dependencies to solve this problem.
The other proposed feature is automatic responsive images. Traditional responsive web design handles image sizing by loading a really big image and then scaling it to fit based on screen size. This means that the same image is loaded for 4k 27″ iMacs as low-res budget smartphones with three-inch screens. The latter device is probably underpowered and is operating on a limited data plan.
A feature plugin aims to solve this by automatically loading the correct image size and making use of the srcset attribute. This enhancement could reduce page load times and server usage, while also removing from themes, the responsibility for fixing the problems this feature addresses.
Forward The Foundation
It’s been awhile since we had to debate if WordPress was just a blog platform, or a true content management system. WordPress has been slowly evolving from a content management system, to becoming a great foundation for application development. It’s been an exciting progression to watch for me.
As I talked about last week, we are the ones that make WordPress great. If you see something you don’t like, work on a patch for it. Together we will keep moving the platform forward. Patches are getting accepted more quickly and can be submitted on GitHub. There’s no reason not to improve upon 4.4.
If I missed any features you’re excited about, feel free to leave them in the comments.