From b0c789282e8c43240edd089d5661d1146cd211a0 Mon Sep 17 00:00:00 2001 From: Ricardo Artemio Morales Date: Thu, 12 Sep 2024 22:57:15 -0400 Subject: [PATCH] Revise paragraph logic to use pattern override content --- packages/block-library/src/paragraph/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/paragraph/index.js b/packages/block-library/src/paragraph/index.js index 715fb35ec05ab1..e87bf6cacab56e 100644 --- a/packages/block-library/src/paragraph/index.js +++ b/packages/block-library/src/paragraph/index.js @@ -30,18 +30,21 @@ export const settings = { __experimentalLabel( attributes, { context } ) { const customName = attributes?.metadata?.name; - if ( context === 'list-view' && customName ) { - return customName; - } - if ( context === 'accessibility' ) { - if ( customName ) { + if ( + customName && + ! attributes?.metadata?.bindings?.source === 'pattern/overrides' + ) { return customName; } const { content } = attributes; return ! content || content.length === 0 ? __( 'Empty' ) : content; } + + if ( context === 'list-view' && customName ) { + return customName; + } }, transforms, deprecated,