Linux 软件免费装

Unregister Broken Patterns

开发者 jeremyfelt
更新时间 2021年3月13日 06:07
PHP版本: 5.6 及以上
WordPress版本: 5.7
版权: GPLv2 or Later
版权网址: 版权信息

标签

blocks block editor block patterns block types

下载

详情介绍:

It is possible to restrict block types from being used in the editor with the allowed_block_types filter. It is also possible to unregister block types entirely. By default, the pattern library in the block editor will continue to to show patterns that contain unavailable blocks. If someone attempts to insert one of these patterns, nothing happens. This plugin attempts to remove any patterns with unavailable blocks. It will currently only operate with block types and patterns that are registered via PHP. This plugin will not be necessary once Gutenberg issue 23275 and others like it are resolved with (very likely) a better long-term solution that can account for PHP and JavaScript. What about JavaScript? If you have ideas on how to approach this in JavaScript, feel free to comment on the open issue!