Make WordPress Core

Ticket #58012: 58012.diff

File 58012.diff, 1.0 KB (added by SergeyBiryukov, 23 months ago)
  • src/wp-admin/load-styles.php

     
    1616define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    1717
    1818require ABSPATH . 'wp-admin/includes/noop.php';
     19require ABSPATH . WPINC . '/compat.php';
    1920require ABSPATH . WPINC . '/theme.php';
    2021require ABSPATH . WPINC . '/class-wp-theme-json-resolver.php';
    2122require ABSPATH . WPINC . '/global-styles-and-settings.php';
     
    7374
    7475        $content = get_file( $path ) . "\n";
    7576
    76         // str_starts_with() is not used here, as wp-includes/compat.php is not loaded in this file.
    77         if ( 0 === strpos( $style->src, '/' . WPINC . '/css/' ) ) {
     77        if ( str_starts_with( $style->src, '/' . WPINC . '/css/' ) ) {
    7878                $content = str_replace( '../images/', '../' . WPINC . '/images/', $content );
    7979                $content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content );
    8080                $content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );