From d2e6cd115679cf810fb34a094c5141c2cf761fcf Mon Sep 17 00:00:00 2001 From: mxkae Date: Mon, 4 Nov 2024 10:16:36 +0800 Subject: [PATCH 1/2] remove dynamic content in customizer --- src/components/dynamic-content-control/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/dynamic-content-control/index.js b/src/components/dynamic-content-control/index.js index 10dc05296..073f5ca02 100644 --- a/src/components/dynamic-content-control/index.js +++ b/src/components/dynamic-content-control/index.js @@ -499,6 +499,9 @@ export const useValueWithFieldsTitle = ( value = '' ) => { const dynamicContent = export const DynamicContentButton = memo( props => { + if ( select( 'core/customize-widgets' ) ) { + return null + } if ( ! isPro && ! showProNotice ) { return null } From f6991442073ca3c4c18571f6c29dc5f95f3e2a2a Mon Sep 17 00:00:00 2001 From: Benjamin Intal Date: Tue, 5 Nov 2024 14:56:27 +0800 Subject: [PATCH 2/2] Update src/components/dynamic-content-control/index.js [skip ci] --- src/components/dynamic-content-control/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/dynamic-content-control/index.js b/src/components/dynamic-content-control/index.js index 073f5ca02..ea6768182 100644 --- a/src/components/dynamic-content-control/index.js +++ b/src/components/dynamic-content-control/index.js @@ -499,6 +499,7 @@ export const useValueWithFieldsTitle = ( value = '' ) => { const dynamicContent = export const DynamicContentButton = memo( props => { + // Hide the button if inside the Customizer if ( select( 'core/customize-widgets' ) ) { return null }