mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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
This commit is contained in:
parent
80494d2e8a
commit
6e1f9dfbcd
@ -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']}')";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user