Index: wp-admin/import/mt.php
===================================================================
--- wp-admin/import/mt.php (revision 6059)
+++ wp-admin/import/mt.php (working copy)
@@ -177,7 +177,7 @@
function select_authors() {
if ( $_POST['upload_type'] === 'ftp' ) {
- $file['file'] = ABSPATH . 'wp-content/mt-export.txt';
+ $file['file'] = ABSPATH . WPCON . '/mt-export.txt';
if ( !file_exists($file['file']) )
$file['error'] = __('mt-export.txt
does not exist');
} else {
@@ -411,7 +411,7 @@
function import() {
$this->id = (int) $_GET['id'];
if ( $this->id == 0 )
- $this->file = ABSPATH . 'wp-content/mt-export.txt';
+ $this->file = ABSPATH . WPCON . '/mt-export.txt';
else
$this->file = get_attached_file($this->id);
$this->get_authors_from_post();
Index: wp-admin/includes/schema.php
===================================================================
--- wp-admin/includes/schema.php (revision 6059)
+++ wp-admin/includes/schema.php (working copy)
@@ -216,10 +216,10 @@
if ( ini_get('safe_mode') ) {
// Safe mode screws up mkdir(), so we must use a flat structure.
add_option('uploads_use_yearmonth_folders', 0);
- add_option('upload_path', 'wp-content');
+ add_option('upload_path', WPCON);
} else {
add_option('uploads_use_yearmonth_folders', 1);
- add_option('upload_path', 'wp-content/uploads');
+ add_option('upload_path', WPCON.'/uploads');
}
// 2.0.3
Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php (revision 6059)
+++ wp-admin/includes/upgrade.php (working copy)
@@ -1,7 +1,7 @@
cache_dir = CACHE_PATH;
else
// Using the correct separator eliminates some cache flush errors on Windows
- $this->cache_dir = ABSPATH.'wp-content'.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR;
+ $this->cache_dir = ABSPATH.WPCON.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR;
if (is_writable($this->cache_dir) && is_dir($this->cache_dir)) {
$this->cache_enabled = true;
} else {
- if (is_writable(ABSPATH.'wp-content')) {
+ if (is_writable(ABSPATH . WPCON)) {
$this->cache_enabled = true;
}
}
Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php (revision 6059)
+++ wp-includes/comment-template.php (working copy)
@@ -307,7 +307,7 @@
if ( file_exists( $include ) )
require( $include );
else
- require( ABSPATH . 'wp-content/themes/default/comments.php');
+ require( ABSPATH . WPCON . '/themes/default/comments.php');
}
function comments_popup_script($width=400, $height=400, $file='') {
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php (revision 6059)
+++ wp-includes/functions.php (working copy)
@@ -922,7 +922,7 @@
$url = trailingslashit($siteurl) . $path;
if ( $dir == ABSPATH ) { //the option was empty
- $dir = ABSPATH . 'wp-content/uploads';
+ $dir = ABSPATH . WPCON . '/uploads';
}
if ( defined('UPLOADS') ) {
Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php (revision 6059)
+++ wp-includes/general-template.php (working copy)
@@ -7,7 +7,7 @@
if ( file_exists( TEMPLATEPATH . '/header.php') )
load_template( TEMPLATEPATH . '/header.php');
else
- load_template( ABSPATH . 'wp-content/themes/default/header.php');
+ load_template( ABSPATH . WPCON . '/themes/default/header.php');
}
@@ -16,7 +16,7 @@
if ( file_exists( TEMPLATEPATH . '/footer.php') )
load_template( TEMPLATEPATH . '/footer.php');
else
- load_template( ABSPATH . 'wp-content/themes/default/footer.php');
+ load_template( ABSPATH . WPCON . '/themes/default/footer.php');
}
@@ -25,7 +25,7 @@
if ( file_exists( TEMPLATEPATH . '/sidebar.php') )
load_template( TEMPLATEPATH . '/sidebar.php');
else
- load_template( ABSPATH . 'wp-content/themes/default/sidebar.php');
+ load_template( ABSPATH . WPCON . '/themes/default/sidebar.php');
}
Index: wp-includes/plugin.php
===================================================================
--- wp-includes/plugin.php (revision 6059)
+++ wp-includes/plugin.php (working copy)
@@ -241,7 +241,7 @@
function plugin_basename($file) {
$file = str_replace('\\','/',$file); // sanitize for Win32 installs
$file = preg_replace('|/+|','/', $file); // remove any duplicate slash
- $file = preg_replace('|^.*/wp-content/plugins/|','',$file); // get relative path from plugins dir
+ $file = preg_replace('|^.*/'.WPCON.'/plugins/|','',$file); // get relative path from plugins dir
return $file;
}
Index: wp-includes/rss.php
===================================================================
--- wp-includes/rss.php (revision 6059)
+++ wp-includes/rss.php (working copy)
@@ -642,11 +642,13 @@
}
class RSSCache {
- var $BASE_CACHE = 'wp-content/cache'; // where the cache files are stored
- var $MAX_AGE = 43200; // when are files stale, default twelve hours
- var $ERROR = ''; // accumulate error messages
+ var $BASE_CACHE = ''; // where the cache files are stored
+ var $MAX_AGE = 43200; // when are files stale, default twelve hours
+ var $ERROR = ''; // accumulate error messages
function RSSCache ($base='', $age='') {
+ $this->BASE_CACHE = WPCON . '/cache';
+
if ( $base ) {
$this->BASE_CACHE = $base;
}
Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php (revision 6059)
+++ wp-includes/theme.php (working copy)
@@ -313,11 +313,11 @@
}
function get_theme_root() {
- return apply_filters('theme_root', ABSPATH . "wp-content/themes");
+ return apply_filters('theme_root', ABSPATH . WPCON . '/themes');
}
function get_theme_root_uri() {
- return apply_filters('theme_root_uri', get_option('siteurl') . "/wp-content/themes", get_option('siteurl'));
+ return apply_filters('theme_root_uri', get_option('siteurl') . '/' . WPCON . '/themes', get_option('siteurl'));
}
function get_query_template($type) {
Index: wp-settings.php
===================================================================
--- wp-settings.php (revision 6059)
+++ wp-settings.php (working copy)
@@ -25,6 +25,9 @@
if ( ! isset($blog_id) )
$blog_id = 1;
+define('WPINC', 'wp-includes');
+define('WPCON', 'wp-content');
+
// Fix for IIS, which doesn't set REQUEST_URI
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
@@ -70,7 +73,7 @@
die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.2.' );
}
-if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') )
+if ( !extension_loaded('mysql') && !file_exists(ABSPATH . WPCON . '/db.php') )
die( 'Your PHP installation appears to be missing the MySQL which is required for WordPress.' );
function timer_start() {
@@ -100,28 +103,26 @@
// For an advanced caching plugin to use, static because you would only want one
if ( defined('WP_CACHE') )
- @include ABSPATH . 'wp-content/advanced-cache.php';
+ @include ABSPATH . WPCON . '/advanced-cache.php';
-define('WPINC', 'wp-includes');
-
if ( !defined('LANGDIR') ) {
- if ( file_exists(ABSPATH . 'wp-content/languages') && @is_dir(ABSPATH . 'wp-content/languages') )
- define('LANGDIR', 'wp-content/languages'); // no leading slash, no trailing slash
+ if ( file_exists(ABSPATH . WPCON . '/languages') && @is_dir(ABSPATH . WPCON . '/languages') )
+ define('LANGDIR', WPCON . '/languages'); // no leading slash, no trailing slash
else
define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash
}
if ( !defined('PLUGINDIR') )
- define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash
-if ( file_exists(ABSPATH . 'wp-content/db.php') )
- require_once (ABSPATH . 'wp-content/db.php');
+ define('PLUGINDIR', WPCON . '/plugins'); // no leading slash, no trailing slash
+if ( file_exists(ABSPATH . WPCON . '/db.php') )
+ require_once (ABSPATH . WPCON . '/db.php');
else
require_once (ABSPATH . WPINC . '/wp-db.php');
// $table_prefix is deprecated as of 2.1
$wpdb->prefix = $table_prefix;
-if ( preg_match('|[^a-z0-9_]|i', $wpdb->prefix) && !file_exists(ABSPATH . 'wp-content/db.php') )
+if ( preg_match('|[^a-z0-9_]|i', $wpdb->prefix) && !file_exists(ABSPATH . WPCON . '/db.php') )
die("ERROR: $table_prefix
in wp-config.php
can only contain numbers, letters, and underscores.");
// Table names
@@ -144,8 +145,8 @@
if ( defined('CUSTOM_USER_META_TABLE') )
$wpdb->usermeta = CUSTOM_USER_META_TABLE;
-if ( file_exists(ABSPATH . 'wp-content/object-cache.php') )
- require_once (ABSPATH . 'wp-content/object-cache.php');
+if ( file_exists(ABSPATH . WPCON . '/object-cache.php') )
+ require_once (ABSPATH . WPCON . '/object-cache.php');
else
require_once (ABSPATH . WPINC . '/cache.php');