From b18037197574a37109d676dc75e4f9a72a44133a Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Thu, 18 Jan 2024 19:43:03 +0900 Subject: [PATCH] Image Block: Make block name affect list view --- packages/block-library/src/image/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/block-library/src/image/index.js b/packages/block-library/src/image/index.js index 1477fa99c702c5..68625bd77cc873 100644 --- a/packages/block-library/src/image/index.js +++ b/packages/block-library/src/image/index.js @@ -29,6 +29,12 @@ export const settings = { }, }, __experimentalLabel( attributes, { context } ) { + const customName = attributes?.metadata?.name; + + if ( context === 'list-view' && customName ) { + return customName; + } + if ( context === 'accessibility' ) { const { caption, alt, url } = attributes;