mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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
This commit is contained in:
parent
8dd3c0e909
commit
0ef5c92164
@ -39,7 +39,7 @@ require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
|
|||||||
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
||||||
|
|
||||||
/** Load wpdb */
|
/** 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;
|
$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;
|
||||||
|
|
||||||
|
@ -92,8 +92,8 @@ function get_file($path) {
|
|||||||
return @file_get_contents($path);
|
return @file_get_contents($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
require(ABSPATH . '/wp-includes/script-loader.php');
|
require( ABSPATH . WPINC . '/script-loader.php' );
|
||||||
require(ABSPATH . '/wp-includes/version.php');
|
require( ABSPATH . WPINC . '/version.php' );
|
||||||
|
|
||||||
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] );
|
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] );
|
||||||
$load = array_unique( explode( ',', $load ) );
|
$load = array_unique( explode( ',', $load ) );
|
||||||
@ -124,10 +124,10 @@ foreach( $load as $handle ) {
|
|||||||
|
|
||||||
$content = get_file( $path ) . "\n";
|
$content = get_file( $path ) . "\n";
|
||||||
|
|
||||||
if ( strpos( $style->src, '/wp-includes/css/' ) === 0 ) {
|
if ( strpos( $style->src, '/' . WPINC . '/css/' ) === 0 ) {
|
||||||
$content = str_replace( '../images/', '../wp-includes/images/', $content );
|
$content = str_replace( '../images/', '../' . WPINC . '/images/', $content );
|
||||||
$content = str_replace( '../js/tinymce/', '../wp-includes/js/tinymce/', $content );
|
$content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content );
|
||||||
$content = str_replace( '../fonts/', '../wp-includes/fonts/', $content );
|
$content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );
|
||||||
$out .= $content;
|
$out .= $content;
|
||||||
} else {
|
} else {
|
||||||
$out .= str_replace( '../images/', 'images/', $content );
|
$out .= str_replace( '../images/', 'images/', $content );
|
||||||
|
@ -439,7 +439,7 @@ define('BLOG_ID_CURRENT_SITE', 1);</textarea>
|
|||||||
$web_config_file .= '
|
$web_config_file .= '
|
||||||
<rule name="WordPress Rule for Files" stopProcessing="true">
|
<rule name="WordPress Rule for Files" stopProcessing="true">
|
||||||
<match url="^' . $iis_subdir_match . 'files/(.+)" ignoreCase="false" />
|
<match url="^' . $iis_subdir_match . 'files/(.+)" ignoreCase="false" />
|
||||||
<action type="Rewrite" url="' . $iis_rewrite_base . 'wp-includes/ms-files.php?file={R:1}" appendQueryString="false" />
|
<action type="Rewrite" url="' . $iis_rewrite_base . WPINC . '/ms-files.php?file={R:1}" appendQueryString="false" />
|
||||||
</rule>';
|
</rule>';
|
||||||
}
|
}
|
||||||
$web_config_file .= '
|
$web_config_file .= '
|
||||||
@ -489,7 +489,7 @@ define('BLOG_ID_CURRENT_SITE', 1);</textarea>
|
|||||||
$ms_files_rewriting = '';
|
$ms_files_rewriting = '';
|
||||||
if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
|
if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
|
||||||
$ms_files_rewriting = "\n# uploaded files\nRewriteRule ^";
|
$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 = <<<EOF
|
$htaccess_file = <<<EOF
|
||||||
|
@ -99,7 +99,7 @@ function setup_config_display_header() {
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title><?php _e( 'WordPress › Setup Configuration File' ); ?></title>
|
<title><?php _e( 'WordPress › Setup Configuration File' ); ?></title>
|
||||||
<link rel="stylesheet" href="css/install.css?ver=<?php echo preg_replace( '/[^0-9a-z\.-]/i', '', $wp_version ); ?>" type="text/css" />
|
<link rel="stylesheet" href="css/install.css?ver=<?php echo preg_replace( '/[^0-9a-z\.-]/i', '', $wp_version ); ?>" type="text/css" />
|
||||||
<link rel="stylesheet" href="../wp-includes/css/buttons.css?ver=<?php echo preg_replace( '/[^0-9a-z\.-]/i', '', $wp_version ); ?>" type="text/css" />
|
<link rel="stylesheet" href="../<?php echo WPINC ?>/css/buttons.css?ver=<?php echo preg_replace( '/[^0-9a-z\.-]/i', '', $wp_version ); ?>" type="text/css" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>">
|
<body class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>">
|
||||||
|
Loading…
Reference in New Issue
Block a user