From 557e939882812e4730fe9720277d4647bab94691 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Thu, 1 Jun 2023 16:42:10 -0500 Subject: [PATCH] [Fonts API] Make local font asset file URL absolute (#51178) Ensures local font asset file URLs also work in iframes. --- lib/experimental/fonts-api/class-wp-fonts-provider-local.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/experimental/fonts-api/class-wp-fonts-provider-local.php b/lib/experimental/fonts-api/class-wp-fonts-provider-local.php index a5dbdb707e41ff..019861a9ae191f 100644 --- a/lib/experimental/fonts-api/class-wp-fonts-provider-local.php +++ b/lib/experimental/fonts-api/class-wp-fonts-provider-local.php @@ -207,11 +207,6 @@ private function compile_src( array $value ) { $src = ''; foreach ( $value as $item ) { - - if ( str_starts_with( $item['url'], get_site_url() ) ) { - $item['url'] = wp_make_link_relative( $item['url'] ); - } - $src .= ( 'data' === $item['format'] ) ? ", url({$item['url']})" : ", url('{$item['url']}') format('{$item['format']}')";