WordPress 5.2 Field Guide

WordPress 5.2 is officially the best WordPress 2019 has seen that rhymes with wp_nav_menu()! Users will see new core blocks available, and an added ability to enable or disable blocks within the block inserter, along with a multitude of other block editor updates.

There are also new features to protect sites from the dreaded “White Screen of Death“, a new area for users to view, copy, and share important debug information, improvements to Accessibility and theming Privacy Policy pages. Developers will love the various new filters and functions, and will also be able to take advantage of 62 enhancements and feature requests, 228 bug fixes, and more! Let’s look at the many improvements coming in 5.2…

Site Health and WSOD Protections

WordPress 5.2 includes portions of the Site Health and Servehappy projects. A new Site Health page nested under the “Tools” menu will run a series of tests on a site pointing out potential issues that site owner should be aware of. Plugins and themes may add their own tests, or modify/remove existing ones using filters. More debugging and support information is displayed within an “Info” tab in the same area of the admin. This information can help developers troubleshoot user issues.

From the Servehappy project comes the addition that allows administrators to fix or mitigate fatal errors on their site that would previously have been impossible to address without developer interference and modifying the codebase. This includes five ways that developers can integrate with the new recovery mode features.

Block Editor

The block editor has continued its rapid iteration since WordPress 5.0, and now has Gutenberg version 5.4 bundled with WordPress 5.2. The most significant change in core is the addition of a a reusable block-editor module to expand the usage of the Block Editor in a context independent from the post editor without any dependency to the post object (e.g., to other WordPress admin pages like the widgets screen).

A new asynchronous mode for block rendering has also been added, new RSS and Amazon Kindle embed blocks were added, and a block management modal with the ability to enable/disable blocks from the block inserter. Improvements to the end-to-end tests have been made (including support for aXe Accessibility testing), as well as improvements to the accuracy of WP_Screen::is_block_editor(). Core blocks (aside from the Classic block) are also no longer using TinyMCE under the hood.


Accessibility updates in 5.2 include improvements to markup for Admin tabs, to post formats in list tables, to Admin Bar submenu link markup, and to the Archive Widget dropdown all to help assistive technologies.

Privacy Policy and Data Exports

The Privacy component has been enhanced with the addition of four new features to make customizing and designing the Privacy Policy page easier. Tag restrictions for User Data Exports have also been relaxed.

Note the shim provided for plugins and themes wanting to support the is_privacy_policy() function in older versions of WordPress


5.2 includes several security-related updates like protection against supply-chain attacks and modern cryptography for WordPress plugins; read below for details and examples.

Other Developer Updates

There are even more goodies in 5.2 like the addition of 13 Dashicons and the WOFF 2.0 file format, the addition of short circuit filters to WP_Site_Query and WP_Network_Query, the addition of the wp_body_open() function to trigger a wp_body_open action, the addition of the category_list_link_attributes filter to Walker_Category, the addition of the users_have_additional_content filter, the update to @wordpress/scripts package to include webpack and Babel configurations, and more!

Note the wp-includes/fonts/dashicons.woff file does NOT include the 13 new icons.
Note the shim provided for themes wanting to utilize the wp_body_open() function in older versions of WordPress and prevent fatal errors from the undefined function

But Wait, There is More!

Over 228 bugs, 59 enhancements, 3 feature requests, and 16 blessed tasks have been marked as fixed in WordPress 5.2. Some additional ones to highlight include:

  • Embeds: YouTube embeds lack title attribute (#40245)
  • Export: Issue with WP Export – adding spaces to .xml file (#46575)
  • Feeds: Feeds now respect the Last-Modified headers (#4575)
  • General: Add sodium_compat — a libsodium-compatible cryptography API for PHP <7.2 (#45806)
  • I18N: The Personal Data Erasure Fulfillment email is now in the Users Locale (#44721)
  • I18N: The Personal Data Export email is now in the Users Locale (#46056)
  • Networks and Sites: Introduces the ms_user_list_site_class filter (#41146)
  • Networks and Sites: Introduces the populate_site_meta filter (#46437)
  • Privacy: The ‘Download Personal Data’ admin action no longer triggers a completion of the request (#44644)
  • Privacy: Users are now able to make additional requests when identical previous requests are in a complete or archived state (#44707)
  • Privacy: Remove the Privacy Pointer (#45999)
  • Privacy: The Privacy Policy guide help notice is now displayed on both the classic editor and the block editor (#46098)
  • Privacy: Remove the Privacy Bubble (#46819)
  • Themes: Add global action to get_template_part (#41575)

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

Props to @desrosj and @earnjam for contributing to this guide.

UPDATE on 7 May 2019: Added “Changes to post globals setup and usage in get_the_content() and related functions in WordPress 5.2″ dev note to the Other Developer Updates section.

UPDATE #2 on 17 May 2019: Added “Security in 5.2” dev note to the newly created Security section.

#5-2, #field-guide