Allow wp-content to exist outside of webroot. Props sambauers. see #6938

git-svn-id: https://develop.svn.wordpress.org/trunk@7999 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-05-27 17:55:24 +00:00
parent f213f87d59
commit 6cc11cbf1e
23 changed files with 140 additions and 112 deletions

View File

@@ -1080,7 +1080,7 @@ function wp_upload_dir( $time = NULL ) {
$siteurl = get_option( 'siteurl' );
$upload_path = get_option( 'upload_path' );
if ( trim($upload_path) === '' )
$upload_path = 'wp-content/uploads';
$upload_path = WP_CONTENT_DIR . '/uploads';
$dir = $upload_path;
// $dir is absolute, $path is (maybe) relative to ABSPATH
@@ -1558,8 +1558,8 @@ function wp_ob_end_flush_all() {
*/
function require_wp_db() {
global $wpdb;
if ( file_exists( ABSPATH . 'wp-content/db.php' ) )
require_once( ABSPATH . 'wp-content/db.php' );
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) )
require_once( WP_CONTENT_DIR . '/db.php' );
else
require_once( ABSPATH . WPINC . '/wp-db.php' );
}
@@ -1568,8 +1568,8 @@ function dead_db() {
global $wpdb;
// Load custom DB error template, if present.
if ( file_exists( ABSPATH . 'wp-content/db-error.php' ) ) {
require_once( ABSPATH . 'wp-content/db-error.php' );
if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {
require_once( WP_CONTENT_DIR . '/db-error.php' );
die();
}