From b395e43ff6de78dcb058ff5ff5c6fd757077752f Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:21:10 +0900 Subject: [PATCH] More Block: Make block name affect list view (#58160) --- packages/block-library/src/more/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/block-library/src/more/index.js b/packages/block-library/src/more/index.js index 4c1fad3cb67f4..b40bb2123bc72 100644 --- a/packages/block-library/src/more/index.js +++ b/packages/block-library/src/more/index.js @@ -20,6 +20,12 @@ export const settings = { icon, example: {}, __experimentalLabel( attributes, { context } ) { + const customName = attributes?.metadata?.name; + + if ( context === 'list-view' && customName ) { + return customName; + } + if ( context === 'accessibility' ) { return attributes.customText; }