Skip to content

Commit

Permalink
Fonts: Check for css property before accessing it
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Feb 15, 2024
1 parent d5750d9 commit fc7b743
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mu-plugins/global-fonts/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ function relative_to_absolute_urls( $editor_settings ) {
}

foreach ( $editor_settings['styles'] as $i => $style ) {
if ( ! isset( $style['css'] ) ) {
continue;
}
if ( str_contains( $style['css'], './Inter' ) || str_contains( $style['css'], './EB-Garamond' ) ) {
$url = plugins_url( '', __FILE__ );
$style['css'] = str_replace( 'url(./', "url($url/", $style['css'] );
Expand Down

0 comments on commit fc7b743

Please sign in to comment.