From 0ef5c92164401882bca7b9db2d10e8f0a3c25dc1 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 29 Jun 2014 22:21:15 +0000 Subject: [PATCH] Admin screens should use the `WPINC` constant Props wojtek.szkutnik See #14157. Built from https://develop.svn.wordpress.org/trunk@28906 git-svn-id: http://core.svn.wordpress.org/trunk@28705 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install.php | 2 +- wp-admin/load-styles.php | 12 ++++++------ wp-admin/network.php | 4 ++-- wp-admin/setup-config.php | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index 7a0870705e..f9bfb095f3 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -39,7 +39,7 @@ require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); /** Load wpdb */ -require_once( ABSPATH . 'wp-includes/wp-db.php' ); +require_once( ABSPATH . WPINC . '/wp-db.php' ); $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; diff --git a/wp-admin/load-styles.php b/wp-admin/load-styles.php index 64ae474199..2c3c5fb93b 100644 --- a/wp-admin/load-styles.php +++ b/wp-admin/load-styles.php @@ -92,8 +92,8 @@ function get_file($path) { return @file_get_contents($path); } -require(ABSPATH . '/wp-includes/script-loader.php'); -require(ABSPATH . '/wp-includes/version.php'); +require( ABSPATH . WPINC . '/script-loader.php' ); +require( ABSPATH . WPINC . '/version.php' ); $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] ); $load = array_unique( explode( ',', $load ) ); @@ -124,10 +124,10 @@ foreach( $load as $handle ) { $content = get_file( $path ) . "\n"; - if ( strpos( $style->src, '/wp-includes/css/' ) === 0 ) { - $content = str_replace( '../images/', '../wp-includes/images/', $content ); - $content = str_replace( '../js/tinymce/', '../wp-includes/js/tinymce/', $content ); - $content = str_replace( '../fonts/', '../wp-includes/fonts/', $content ); + if ( strpos( $style->src, '/' . WPINC . '/css/' ) === 0 ) { + $content = str_replace( '../images/', '../' . WPINC . '/images/', $content ); + $content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content ); + $content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content ); $out .= $content; } else { $out .= str_replace( '../images/', 'images/', $content ); diff --git a/wp-admin/network.php b/wp-admin/network.php index e848009cb5..05c9de99b2 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -439,7 +439,7 @@ define('BLOG_ID_CURRENT_SITE', 1); $web_config_file .= ' - + '; } $web_config_file .= ' @@ -489,7 +489,7 @@ define('BLOG_ID_CURRENT_SITE', 1); $ms_files_rewriting = ''; if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { $ms_files_rewriting = "\n# uploaded files\nRewriteRule ^"; - $ms_files_rewriting .= $subdir_match . "files/(.+) {$rewrite_base}wp-includes/ms-files.php?file={$subdir_replacement_12} [L]" . "\n"; + $ms_files_rewriting .= $subdir_match . "files/(.+) {$rewrite_base}" . WPINC . "/ms-files.php?file={$subdir_replacement_12} [L]" . "\n"; } $htaccess_file = << <?php _e( 'WordPress › Setup Configuration File' ); ?> - +