PluginProbe
Extendify / 0.9.2
Extendify v0.9.2
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / src / Library / blocks / block-category.js

block-category.js in Extendify 0.9.2, at src/Library/blocks/block-category.js

31 lines 764 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies
3 */
4 import { registerBlockCollection, setCategories } from '@wordpress/blocks'
5 import { Icon } from '@wordpress/components'
6 import { select } from '@wordpress/data'
7 import { brandBlockIcon } from '@library/components/icons'
8
9 /**
10 * Register the 'Extendify' block category.
11 *
12 * Note: The category label is overridden via registerBlockCollection() below.
13 */
14 const currentCategories = select('core/blocks').getCategories()
15 setCategories([
16 {
17 slug: 'extendify',
18 title: 'Extendify',
19 icon: null,
20 },
21 ...currentCategories,
22 ])
23
24 /**
25 * Function to register a block collection for our block(s).
26 */
27 registerBlockCollection('extendify', {
28 title: 'Extendify',
29 icon: <Icon icon={brandBlockIcon} />,
30 })
31