如何隐藏/禁用新Post creator上的每个功能,
仅以下区域可见:
古腾堡编辑器(Gutenberg Editor)发布按钮(Publish button)标签(Tags)类别(Categories)甚至隐藏左侧边栏和所有菜单选项。
如何隐藏/禁用新Post creator上的每个功能,
仅以下区域可见:
古腾堡编辑器(Gutenberg Editor)发布按钮(Publish button)标签(Tags)类别(Categories)甚至隐藏左侧边栏和所有菜单选项。
可以删除与整个帖子相关的一些面板(例如,特色图片、摘录),然后https://github.com/WordPress/gutenberg/issues/17281 显示如何。
e、 g。
wp.data.dispatch( \'core/edit-post\').removeEditorPanel( \'featured-image\' );
wp.data.dispatch( \'core/edit-post\').removeEditorPanel( \'post-excerpt\' );
侧栏还用于其他块选项和there\'s currently no cohesive, consistent way to manage whether a block\'s options 可供您的编辑器使用。我目前正在为Wordpress编写我的第一个OOP插件。为了帮助我找到一点结构,a boiler plate 这为我奠定了基础。在里面Main.php 有一种方法可以为管理员加载JS和CSS资产:/** * Register all of the hooks related to the admin area functionality * of the plugin. * * @since 0.1.0 * @access private