While most of the obvious flash in WordPress 5.8 is on the user-facing side of things, there’s some awesome quality of life improvements in here; focusing on improvements to blocks and how different elements of a WordPress site interact with each other. Most of all, there’s some really awesome potential to evolve into much larger things as time passes.
If you’ve been waiting for a good time to take a deep dive into Gutenberg, stop procrastinating — the time is now.
Deeper Control with theme.json and block.json
The biggest impact from a development perspective is the addition of the new theme.json and block.json mechanisms for managing deeper control within the Gutenberg editor. It’s certainly the feature that I’m most excited about.
Previously, anyone developing a WordPress theme had to put forth a significant amount of effort to avoid conflicts with plugins, consider child themes (and subsequent updates), and jump through numerous hurdles when passing data around. The new theme.json and related block.json metadata files help to soothe that pain by providing a standardized method for accessing and defining properties.
Can we finally say goodbye the chaos of overriding a million CSS classes just to get a pagebuilder to stop ripping our styles apart? Time will tell.
New Plugin Header Tag: Update URL
Inside of WordPress 5.8 is a feature that you might not know about or ever encounter, but it’s a big deal for a lot of us — the new Update URI tag.
In previous versions of WordPress, developers had to be careful when naming their plugin directories to avoid them being overwritten by another plugin with the same slug. This usually meant that one-off plugins couldn’t be named something like `generic-name`, because the WordPress updater could come along, find a plugin with the same slug on the plugin repository, and overwrite it with an entirely different plugin.
Plugins and themes can now take advantage of the Update URI tag to provide an alternate resource or just disable updates altogether.
Further Potential?
When writing this up, I got to thinking — this tag could be useful when forking a plugin. Sometimes you just need to fix a bug before the author can provide their own fix or merge in your pull request. If you need to make a quick patch for the plugin to solve a temporary issue, you can disable updates entirely without any other changes. Then, once the fix is available from the author, you can just pull the tag and update normally.
There’s some really cool potential here. I’m looking forward to see how this evolves in the future.
WebP support
As of WordPress 5.8, WebP images are finally supported (shameless plug: Pagely has been supporting them for a while through PressThumb). Just upload your WebP images and enjoy the smaller files and faster load times baked right into WordPress 5.8.
delete_theme and deleted_theme Action Hooks
Plugins have been able to fire additional actions upon deletion for a while now, but themes had always been left out. Since nobody puts Baby in the corner, themes can now clean up after themselves too!
(Yes, I’m bad about it too, but you really should add database cleanup hooks to run on deletion. A clean database is a happy database.)
Better Control Of Revisions Based On Post Type
Storing a ton of revisions can get chaotic for your database. Although revisions are super helpful, they’re not always necessary for every post type. To have any additional control, you’d have to use the wp_revisions_to_keep filter and check the WP_Post object for the post type or whatever else you might need.
WordPress 5.8 expands on this by providing an alternative wp_{$post_type}_revisions_to_keep filter, allowing you to just return a value for a specific post type. Is it groundbreaking? Not really. But it’s a sanity feature that will certainly come in handy.
Additional WordPress 5.8 Resources
- WordPress 5.8 – Field Guide
- Introducing theme.json in WordPress 5.8
- WordPress 5.8 adds WebP support
- Introducing “Update URI” plugin header in WordPress 5.8
When will Pagely customers receive WordPress 5.8?
We generally do not upgrade existing sites to the first new release of WordPress. We’ll wait for version 5.8.1 or 5.8.2 so any bugs can be addressed. However, if you’re ready to take the plunge you can contact our support team if you want to upgrade your existing site.