Skip to content

Blocks: Introduce 'getBlockIcon' and 'getBlockTitle` selectors #58641

@Mamaduka

Description

@Mamaduka

A proposal to introduce getBlockIcon and getBlockTitle selectors for the Blocks store.

const icon = getBlockIcon( blockName, attributes );
const title = getBlockTitle( blockName, attributes );

Why

These values are crucial to the Block's identity and accessibility. They are fetched and rendered repeatedly throughout the editors. So, they should be easily accessible via selectors instead of relying on custom hooks.

cc @WordPress/gutenberg-core

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Blocks/packages/blocks[Type] New APINew API to be used by plugin developers or package users.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions