Make WordPress Core

Changeset 56139


Ignore:
Timestamp:
07/05/2023 12:32:52 PM (18 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r56125 r56139  
    35263526
    35273527        foreach ( $value as $item ) {
    3528 
    3529             if (
    3530                 str_starts_with( $item['url'], site_url() ) ||
    3531                 str_starts_with( $item['url'], home_url() )
    3532             ) {
    3533                 $item['url'] = wp_make_link_relative( $item['url'] );
    3534             }
    3535 
    35363528            $src .= ( 'data' === $item['format'] )
    35373529                ? ", url({$item['url']})"
Note: See TracChangeset for help on using the changeset viewer.