Make WordPress Core


Ignore:
Timestamp:
06/29/2014 10:20:26 PM (10 years ago)
Author:
wonderboymusic
Message:

Admin screens should use the WPINC constant

Props wojtek.szkutnik
See #14157.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/load-styles.php

    r27253 r28906  
    9393}
    9494
    95 require(ABSPATH . '/wp-includes/script-loader.php');
    96 require(ABSPATH . '/wp-includes/version.php');
     95require( ABSPATH . WPINC . '/script-loader.php' );
     96require( ABSPATH . WPINC . '/version.php' );
    9797
    9898$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] );
     
    125125    $content = get_file( $path ) . "\n";
    126126
    127     if ( strpos( $style->src, '/wp-includes/css/' ) === 0 ) {
    128         $content = str_replace( '../images/', '../wp-includes/images/', $content );
    129         $content = str_replace( '../js/tinymce/', '../wp-includes/js/tinymce/', $content );
    130         $content = str_replace( '../fonts/', '../wp-includes/fonts/', $content );
     127    if ( strpos( $style->src, '/' . WPINC . '/css/' ) === 0 ) {
     128        $content = str_replace( '../images/', '../' . WPINC . '/images/', $content );
     129        $content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content );
     130        $content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );
    131131        $out .= $content;
    132132    } else {
Note: See TracChangeset for help on using the changeset viewer.