From f0e8ba55e541da2affb22281f4dd5b3bb70b5ea0 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 8 Jan 2021 18:42:44 +0100 Subject: [PATCH 1/4] Add reusable block action button hook --- src/strings-overrides.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/strings-overrides.js b/src/strings-overrides.js index 8a4e8e1ea6..dbe1deb894 100644 --- a/src/strings-overrides.js +++ b/src/strings-overrides.js @@ -56,3 +56,24 @@ addFilter( : defaultValue; } ); + +addFilter( + 'native.reusable_block_action_button', + 'native/reusable_block', + ( defaultValue ) => { + const { getSettings } = select( 'core/block-editor' ); + const isUnsupportedBlockEditorSupported = + getSettings( 'capabilities' ).unsupportedBlockEditor === true; + const canEnableUnsupportedBlockEditor = + getSettings( 'capabilities' ).canEnableUnsupportedBlockEditor === + true; + + const shouldOverwriteButtonTitle = + isUnsupportedBlockEditorSupported === false && + canEnableUnsupportedBlockEditor; + + return shouldOverwriteButtonTitle + ? __( 'Open Jetpack Security settings' ) + : defaultValue; + } +); From 5b392cd1ec388c17e6781a46c6db5e6387729146 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 19 Jan 2021 13:53:20 +0100 Subject: [PATCH 2/4] Updated gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index ea489427a9..9f021bb96a 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit ea489427a90f54b4bbbb6cf4b8df5c870efd3bf3 +Subproject commit 9f021bb96a6d2fd14c7ae0c26646ef8bd4b965f4 From 1612f46d22182ac6a1b2c84a0f69f2d501fb18dd Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 19 Jan 2021 15:38:03 +0100 Subject: [PATCH 3/4] Updated gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 9f021bb96a..ee9a710d40 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 9f021bb96a6d2fd14c7ae0c26646ef8bd4b965f4 +Subproject commit ee9a710d40d723b878c6febff98fb383c40e0fef From c0a591004bb4a61c0f0a6474c17b0e641c56a4bb Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 21 Jan 2021 11:05:52 +0100 Subject: [PATCH 4/4] Updated gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index ee9a710d40..ff84114c6b 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit ee9a710d40d723b878c6febff98fb383c40e0fef +Subproject commit ff84114c6b4ca6f9248d7dc53a95ce4d7e72c462