kuno1 / icon

An icon communicator for WordPress.
GNU General Public License v3.0
1 stars 0 forks source link

Change Icon block category to media #3

Open waviaei opened 4 years ago

waviaei commented 4 years ago

It is currently common. https://github.com/kuno1/icon/blob/33264e14a475f19a496cb38f54e127f090a16020/assets/js/icon-block.js#L17

However, block categories has been changed and merged into 5.5. A block that is in common now appears in text. But I think Icon block is more close to media than text. So I would like to suggest to change to media

https://github.com/WordPress/gutenberg/pull/19279

waviaei commented 6 months ago

最新のブロックカテゴリ https://developer.wordpress.org/reference/functions/get_default_block_categories/

function get_default_block_categories() {
    return array(
        array(
            'slug'  => 'text',
            'title' => _x( 'Text', 'block category' ),
            'icon'  => null,
        ),
        array(
            'slug'  => 'media',
            'title' => _x( 'Media', 'block category' ),
            'icon'  => null,
        ),
        array(
            'slug'  => 'design',
            'title' => _x( 'Design', 'block category' ),
            'icon'  => null,
        ),
        array(
            'slug'  => 'widgets',
            'title' => _x( 'Widgets', 'block category' ),
            'icon'  => null,
        ),
        array(
            'slug'  => 'theme',
            'title' => _x( 'Theme', 'block category' ),
            'icon'  => null,
        ),
        array(
            'slug'  => 'embed',
            'title' => _x( 'Embeds', 'block category' ),
            'icon'  => null,
        ),
        array(
            'slug'  => 'reusable',
            'title' => _x( 'Patterns', 'block category' ),
            'icon'  => null,
        ),
    );
}