mikacaldera / gutenberg-category
为自定义 Gutenberg 块自定义分类类型
3.0
2021-07-21 19:27 UTC
Requires
- php: >=7.3.11
- composer/installers: ^1.0
README
该包将在您的 Gutenberg 块列表中创建一个名为“自定义”的特殊分类。为使用 sage 和 roots.io 的自定义 WordPress 网站创建。
🔌 安装
将以下代码片段添加到您的站点中
{
"type": "vcs",
"url": "git@github.com:MikaCaldera/gutenberg-category.git"
}
在您的站点文件夹中运行以下命令。
composer require "mikacaldera/gutenberg-category"
📐 使用
当您创建一个新的自定义 Gutenberg 块时,使用分类 custom 以将其列在自定义 Gutenberg 块下。
// Basic Specs
title: __( 'Container', 'create-block' ),
description: __(
'Adds options for a container and background color.',
'create-block'
),
keywords: [__('container'), __('full'), __('block')],
category: 'custom',
icon: 'editor-contract',