# extendify/0.10.0/src/Library/blocks/block-category.js

Extendify, version 0.10.0. 31 lines.

- Page: https://pluginprobe.com/plugins/extendify/0.10.0/code/src/Library/blocks/block-category.js
- Raw: https://pluginprobe.com/plugins/extendify/0.10.0/raw/src/Library/blocks/block-category.js
- Modified: 2022-05-27T00:51:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/0.10.0/code/src/Library/blocks/block-category.js#L10-L20`.

```javascript
/**
 * WordPress dependencies
 */
import { registerBlockCollection, setCategories } from '@wordpress/blocks'
import { Icon } from '@wordpress/components'
import { select } from '@wordpress/data'
import { brandBlockIcon } from '@library/components/icons'

/**
 * Register the 'Extendify' block category.
 *
 * Note: The category label is overridden via registerBlockCollection() below.
 */
const currentCategories = select('core/blocks').getCategories()
setCategories([
    {
        slug: 'extendify',
        title: 'Extendify',
        icon: null,
    },
    ...currentCategories,
])

/**
 * Function to register a block collection for our block(s).
 */
registerBlockCollection('extendify', {
    title: 'Extendify',
    icon: <Icon icon={brandBlockIcon} />,
})

```
