Skip to content

Commit

Permalink
Restore the default editor font for the non FSE themes (#30080)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored Mar 22, 2021
1 parent 85bf3a7 commit 8205404
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,12 @@ function gutenberg_extend_block_editor_styles( $settings ) {
unset( $settings['styles'][ $i ] );
}

// Remove the default font editor styles.
// When Gutenberg is updated to have minimum version of WordPress 5.8
// This could be removed.
foreach ( $settings['styles'] as $j => $style ) {
if ( 0 === strpos( $style['css'], 'body { font-family:' ) ) {
unset( $settings['styles'][ $j ] );
// Remove the default font editor styles for FSE themes.
if ( gutenberg_is_fse_theme() ) {
foreach ( $settings['styles'] as $j => $style ) {
if ( 0 === strpos( $style['css'], 'body { font-family:' ) ) {
unset( $settings['styles'][ $j ] );
}
}
}

Expand Down

0 comments on commit 8205404

Please sign in to comment.