Gutenberg 11.6 Introduces New API for Locking Blocks

Gutenberg 11.6 Introduces New API for Locking Blocks

Posted by WP Tavern on September 30, 2021 at 10:00 pm
kitty kitty CATegory News
Gutenberg 11.6 was released this week with a new API for managing lock control at the block-type level. When defining a block, developers can now use the lock attribute to designate whether a block can be moved or removed. The PR introduces parts of the locking support mechanisms proposed by Matias Ventura in a separate issue earlier this year. Ventura explained that while the editor already has template locking support to prevent inserting or moving blocks (i.e. for custom post type templates), it doesn’t yet offer much granular control or a UI for the different locking states. He identified block themes as an important use case for establishing a new block-level API for representing lock status. Block themes may necessitate the ability to lock down key elements, such as preventing the removal of the post-content for a single post template. If you have ever played around with the template editor then you have likely discovered how easy it is to remove important elements by accident. Block locking UI mockup “Another use case that we’re building for is having a Checkout Block with different blocks that act as fundamental steps,” WooCommerce and Gutenberg engineer Seghir Nadir said. “We don’t want people to delete…

…Full post on WP Tavern
Read Full

Similar Posts

Leave a Reply