From 7a7b8e0d5c4f9a83325e13f28457606cfe487a88 Mon Sep 17 00:00:00 2001 From: Mark Root-Wiley Date: Sat, 15 Oct 2022 10:43:52 -0700 Subject: [PATCH] Hide duotone setting. Currently doesn't remove SVGs from body, though, which is probably best for backcompat. Closes #39 --- inc/block-editor.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inc/block-editor.php b/inc/block-editor.php index 86532b1..5f5be3b 100644 --- a/inc/block-editor.php +++ b/inc/block-editor.php @@ -337,6 +337,7 @@ function mrw_hidden_block_editor_settings() { 'default-color-palette', 'default-style-variation', 'drop-cap', + 'duotone', 'font-weight', 'font-style', 'heading-1', @@ -403,6 +404,12 @@ function mrw_block_editor_settings( $editor_settings, $context ) { $editor_settings['__experimentalFeatures']['typography']['dropCap'] = false; } + /* Duotone */ + if( in_array( 'duotone', $hidden_settings ) ) { + $editor_settings['__experimentalFeatures']['color']['duotone'] = null; + $editor_settings['__experimentalFeatures']['color']['customDuotone'] = false; + } + /* Font Style */ if( in_array( 'font-style', $hidden_settings) ) { $editor_settings['__experimentalFeatures']['typography']['fontStyle'] = false;