+44 0330 223 3428
Call Us
+44 0330 223 3428

WPTavern: Gutenberg 1.8 Adds Greater Extensibility for Plugin Developers

WPTavern: Gutenberg 1.8 Adds Greater Extensibility for Plugin Developers

Gutenberg 1.8 was released this week with several notable improvements that will give plugin developers more flexibility in extending the editor. It introduces block templates, which developers can use when registering a new custom post type. The block templates define a set of pre-configured blocks that will initialize when a user creates a new post. In the example below, Gutenberg lead engineer Matias Ventura demonstrates what a block template for a book custom post type might look like.

This release also improves the design of the tools menu (toggled by the ellipses at the top of the editor) to have a more lightweight UI that will lend itself better to displaying items added by extensions in the future. The new design displays multiple menu items as a radio group where the selected item shows a checkmark, an approach that Gutenberg designers found to be more intuitive after some research.

Version 1.8 adds the ability for developers to filter allowed block types by specifying an array of type names that can be shown in the inserter component. This capability paves the way for block nesting where developers can define allowed children types. It also allows custom post types to specify which blocks are allowed or restricted, which will be useful for keeping CPTs lean as Gutenberg already has a large number of block types.

The release also improves meta box compatibility with a fallback to the classic editor if Gutenberg detects that the meta box is unsupported. Plugin authors can now explicitly declare Gutenberg incompatibility when registering meta boxes, which will trigger a warning to the end user that explains which meta boxes have caused the fallback to the classic editor.

In addition to all the improvements for extending Gutenberg, version 1.8 makes many small design tweaks, including updated color pickers with color indications and collapsible panels, updated icon and tooltip for table of contents menu, and a new contrast checker for paragraph color options. It also puts block actions back on the block level for the default, while still preserving the option to change it to a fixed toolbar at the top of the screen.

For a full list of all the changes in version 1.8, check out the release post and the changelog on WordPress.org.



Source: WordPress

Related Post
WPTavern: Gutenberg 3.9 Introduces Reusable, Exportable Templates for Multiple Blocks

WPTavern: Gutenberg 3.9 Introduces Reusable, Exportable Templates for Multiple Blocks Gutenberg 3.9 was released last week with a new feature that allows users to group multiple blocks into reusable templates. The templates can also be exported and imported as a JSON file. The idea of reusable templates is an expansion of the concept of dynamic […]

Read more
WPTavern: New commonWP Plugin Enables WordPress Sites to Use the Free jsDelivr CDN

WPTavern: New commonWP Plugin Enables WordPress Sites to Use the Free jsDelivr CDN Milan Dinić, a WordPress developer based in Serbia, has released his commonWP plugin that enables WordPress sites to use the free, public jsDelivr CDN. Last year jsDelivr was revamped to allow any file from GitHub and npm to be served by the […]

Read more
WPTavern: Gutenstats Blog Is Live, Tracking Gutenberg Beta Testing Data

WPTavern: Gutenstats Blog Is Live, Tracking Gutenberg Beta Testing Data Matt Mullenweg tweeted out a link to Gutenstats.blog this evening, a new site dedicated to tracking Gutenberg beta testing data. The site shows there are currently more than 420,000 active installations of Gutenberg, a slightly more precise number than reported on the WordPress.org plugin page […]

Read more