Skip to content

Commit 1ea4cd4

Browse files
hellofromtonyaartemiomorales
authored andcommitted
[Fonts API] Make local font asset file URL absolute (WordPress#51178)
Ensures local font asset file URLs also work in iframes.
1 parent 3834625 commit 1ea4cd4

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/experimental/fonts-api/class-wp-fonts-provider-local.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,6 @@ private function compile_src( array $value ) {
207207
$src = '';
208208

209209
foreach ( $value as $item ) {
210-
211-
if ( str_starts_with( $item['url'], get_site_url() ) ) {
212-
$item['url'] = wp_make_link_relative( $item['url'] );
213-
}
214-
215210
$src .= ( 'data' === $item['format'] )
216211
? ", url({$item['url']})"
217212
: ", url('{$item['url']}') format('{$item['format']}')";

0 commit comments

Comments
 (0)