From 6e1f9dfbcd52c51fe6b4e44dda79209e9277146c Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Wed, 5 Jul 2023 12:32:52 +0000 Subject: [PATCH] Editor: Fix font paths in iframed editor. By making font asset files URLs absolute instead of relative, this ensures each font asset file does properly relate to the actual location of the files. See https://github.com/WordPress/gutenberg/pull/50875. Props ironprogrammer, antonvlasenko, ndiego, shuvo247, robinwpdeveloper. Fixes #58672. git-svn-id: https://develop.svn.wordpress.org/trunk@56139 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 80f48d43a5..741e29ac18 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -3525,14 +3525,6 @@ function _wp_theme_json_webfonts_handler() { $src = ''; foreach ( $value as $item ) { - - if ( - str_starts_with( $item['url'], site_url() ) || - str_starts_with( $item['url'], home_url() ) - ) { - $item['url'] = wp_make_link_relative( $item['url'] ); - } - $src .= ( 'data' === $item['format'] ) ? ", url({$item['url']})" : ", url('{$item['url']}') format('{$item['format']}')";