Skip to content

Commit

Permalink
Revert "Quick and dirty fix for non-iframed editor. See https://wordp…
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-vlasenko authored and hellofromtonya committed Jul 6, 2023
1 parent 33f65a2 commit c6746db
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions lib/experimental/fonts-api/fonts-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,8 @@ static function( $settings ) {
wp_print_fonts( true );
$styles = ob_get_clean();

// The fonts are wrapped in the STYLE tag, which has to be removed.
$styles = strip_tags( $styles );

// Add the font-face styles to the editor assets.
if ( empty( $settings['styles'] ) ) {
$settings['styles'] = array();
}

$settings['styles'][] = array(
'css' => $styles,
'__unstableType' => 'theme',
'isGlobalStyles' => true,
);

// Add the font-face styles to iframed editor assets.
$settings['__unstableResolvedAssets']['styles'] .= $styles;
return $settings;
},
11
Expand Down

0 comments on commit c6746db

Please sign in to comment.