WordPress 5.1 Field Guide

WordPress 5.1 is officially the best WordPress 2019 has seen yet! Users will see block editor improvements while developers will see PHP version upgrade notices and will be able to take advantage of 165 enhancements and features added.  Let’s look at the many improvements coming in 5.1…

Site Health 💻🏥

WordPress 5.1 includes portions of the Servehappy and Site Health projects. Notices will start being displayed to administrators of sites that run on long outdated PHP versions. WordPress will also start honoring plugin PHP version requirements.

Block Editor Goodies 🧱🏗️

The block editor continued its rapid iteration since WordPress 5.0 and now has version 4.8 of the Gutenberg plugin bundled with WordPress 5.1. Most significantly, this includes performance improvements within the editor, a Getting Started with JavaScript tutorial, improvements to the design guidelines to build blocks, and high-quality README files for the UI components.

Multisite Metadata 🏘️🗂️

5.1 brings with it a new database table to store metadata associated with sites, which allows for the storage of arbitrary site data relevant in a multisite / network context.

Cron API 🔁🔂

WordPress 5.1 includes a change in behavior for cron spawning on servers running FastCGI and PHP versions 7.0.16 and above. It also includes a change to the Cron API that updates the return values for functions used to modify scheduled tasks, it includes two new functions to assist with returning data (one to retrieve cron jobs ready to be run and another to retrieve a scheduled event), and it includes new filters for modifying cron storage.

New JS Build Process 🇯🇸🏭

The JavaScript code reorganization has been in `trunk since April 2018 and the new JavaScript build process will ship with WordPress 5.1.

Updated Styles and Strings 🔗🧵

Read below to learn about how the admin table pagination links have had their CSS styling modified to improve accessibility and how Locale Managers with commit access on the /dist repository will need to manually translate and deploy changes to files that cannot use gettext.

Other Developer ❤️

There are even more goodies in 5.1 like updates to values allowed for the WP_DEBUG_LOG constant, new test config file constant in the test suite, new plugin action hooks, short circuit filters for wp_unique_post_slug() and WP_User_Query and count_users(), a new human_readable_duration function, improved taxonomy metabox sanitization, limited LIKE support for meta keys when using WP_Meta_Query, a new “doing it wrong” notice when registering REST API endpoints, and more!

There are also a few additional changes that will receive a dev note shortly:

  • Object Caching can now degrade gracefully (#22661)
  • New parameter for the wp_check_filetype_and_ext filter (#45707)
  • New filter for filtering and overriding block attributes (#45451)

But Wait, There is More!

Over 303 bugs, 156 enhancements, 9 feature requests, and 23 blessed tasks have been marked as fixed in WordPress 5.1. Some additional ones to highlight include:

  • Bootstrap/Load: WSODs protection returns incorrect content type for JSON Requests (#45933)
  • Cache API: Allow object caches to degrade gracefully (#22661)
  • Customize: Improve browser compatibility of X-Frame-Options and Content-Security-Policy headers for window in preview iframe (#40020)
  • Customize: Use iframe sandbox attribute to restrict browsing in Customizer preview instead of attempting to rely on JS to intercept top navigation (#42341)
  • Customize: Fix counting of sections for widget sidebars, allowing non-sidebar sections to not interfere (#43556)
  • Customize: Prevent wp_targeted_link_rel() from corrupting Customizer changeset data (#45292)
  • Media: Parse the creation date out of uploaded audio files (#42017)
  • Media: No placeholder for ico file in list view of Media Library (#43458)
  • Media: media_handle_sideload() may unexpectedly return 0 on error (#44303)
  • Menus: Improve headings and instructions for better accessibility (#43397)
  • Menus: Show an appropriate message when no menus exist (#45155)
  • Networks and Sites: Improve site creation in multisite (#40364)
  • Networks and Sites: Introduce ms-site.php and ms-network.php files (#40647)
  • Networks and Sites: Implement wp_initialize_site() and wp_uninitialize_site() (#41333)
  • Plugins: Disable “Install Plugin” button for PHP required version mismatch (#43986)
  • Privacy: Show the comment / awaiting moderation message even without opt-in (#43857)
  • Query: post__in orderby not working when passed in an array to orderby (#38034)
  • REST API: Allow to filter the query in the search controller (#45454)
  • Taxonomy: Add un|registered_taxonomy_for_object_type action (#44733)
  • Users: New filter to short circuit WP_User_Query results (#44169)
  • Widgets: Make the Widgets screen “Enable accessibility mode” link more discoverable (#42778)
  • Widgets: Fix Gallery Widget preview after an image is deleted (#43139)
  • Widgets: Fix custom HTML widget editor content not updating after save (#43657)

Please, test your code. Fixing issues helps you and helps millions of WordPress sites.

Props @desrosj for contributing to this guide.

#5-1, #field-guide