From 95c068a235d0f025d7fac22fb4a6c80881fd46ca Mon Sep 17 00:00:00 2001 From: Sarah Norris Date: Thu, 15 Aug 2024 12:17:26 +0100 Subject: [PATCH] Add check for preference.savePatterns --- src/editor-sidebar/save-panel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor-sidebar/save-panel.js b/src/editor-sidebar/save-panel.js index 9b67c1d4..8266f91e 100644 --- a/src/editor-sidebar/save-panel.js +++ b/src/editor-sidebar/save-panel.js @@ -73,8 +73,9 @@ export const SaveThemePanel = () => { const searchParams = new URLSearchParams( window?.location?.search ); - // If user is editing a pattern, redirect back to the patterns page. + // If user is editing a pattern and savePatterns is true, redirect back to the patterns page. if ( + preference.savePatterns && searchParams.get( 'postType' ) === 'wp_block' && searchParams.get( 'postId' ) ) {