New Release: WordPress 5.4

WordPress 5.4 has been released to the VIP Platform. Named “Adderley” in honor of jazz trumpeter Nat Adderley, this latest release includes many new features for Gutenberg alongside accessibility improvements and various developer-focused changes.

The Highlights

WordPress 5.4 merges ten releases of the Gutenberg plugin, including the most recent, Gutenberg 7.5. This means there’s a long list of exciting features including two new blocks—social links and buttons. The former lets you add social media links anywhere within a post. The latter makes it easy to add buttons side by side within a post.

The new release also adds new color customization options including gradients in the Buttons and Cover blocks, toolbar access to color options in Rich Text blocks, and for the first time, color options in the Group and Columns blocks.

For accessibility, WordPress 5.4 introduces clearer block navigation with block breadcrumbs plus better tabbing and focus when using keyboard navigation.

Developers can look forward to many features and improvements including two new actions related to custom menus:

  • On the Menus admin screen, wp_nav_menu_item_custom_fields fires just before the move buttons of a nav menu item in the menu editor.
  • In the Customizer, wp_nav_menu_item_custom_fields_customize_template fires at the end of the menu-items form-fields template.

Block styling is also simplified. Negative margins and default padding are gone! Now you can style blocks the way you need them.

Fullscreen Mode Enabled by Default in the Editor

Beginning with WordPress 5.4, Gutenberg opens in fullscreen mode by default the first time the editor is opened in a new installation or on a new device.

Individual users can disable this setting by switching modes in the editor menu.

This editor preference is stored locally for now, which means it will reset to fullscreen mode any time the editor is used on a new device or in incognito mode or if user preferences are reset.

We understand some users may want to disable this option, preferring to default to the traditional editor view. The following code snippet can be adjusted and added to any site’s theme files to disable the fullscreen mode default. Please note, this only applies to sites using the Gutenberg editor; the classic editor will be unaffected.

function disable_editor_fullscreen_by_default() {
  $script = "jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ); if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } });";
  wp_add_inline_script( 'wp-blocks', $script );
}
add_action( 'enqueue_block_editor_assets', 'disable_editor_fullscreen_by_default' );

Learn More

For more details about the 5.4 release (including specific changes), please see the announcement post and Field Guide.

Questions?

If you have any questions related to this release, please open a support ticket and we will be happy to assist.