Skip to content

Commit

Permalink
Merge branch 'develop' into merge_release_1.45.0_to_develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendy Chen committed Jan 22, 2021
2 parents ddbed41 + 776e5e8 commit 6cb3549
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/strings-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
);

0 comments on commit 6cb3549

Please sign in to comment.