diff --git a/src/wp-admin/load-styles.php b/src/wp-admin/load-styles.php index d75cfbe8d8..eb05554de2 100644 --- a/src/wp-admin/load-styles.php +++ b/src/wp-admin/load-styles.php @@ -73,7 +73,8 @@ foreach ( $load as $handle ) { $content = get_file( $path ) . "\n"; - if ( str_starts_with( $style->src, '/' . WPINC . '/css/' ) ) { + // str_starts_with() is not used here, as wp-includes/compat.php is not loaded in this file. + if ( 0 === strpos( $style->src, '/' . WPINC . '/css/' ) ) { $content = str_replace( '../images/', '../' . WPINC . '/images/', $content ); $content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content ); $content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );