Skip to content

Commit

Permalink
Hide duotone setting. Currently doesn't remove SVGs from body, though…
Browse files Browse the repository at this point in the history
…, which is probably best for backcompat. Closes #39
  • Loading branch information
mrwweb committed Oct 15, 2022
1 parent 801a8fd commit 7a7b8e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions inc/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7a7b8e0

Please sign in to comment.