Make WordPress Core

Changeset 15197


Ignore:
Timestamp:
06/10/2010 07:37:51 PM (16 years ago)
Author:
wpmuguru
Message:

allow custom content dir in WP 3.0 main site, fixes #13733

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r15116 r15197  
    21262126        $upload_path = get_option( 'upload_path' );
    21272127        $upload_path = trim($upload_path);
    2128         $main_override = false;
     2128        $main_override = defined( 'MULTISITE' ) && is_main_site();
    21292129        if ( empty($upload_path) ) {
    21302130                $dir = WP_CONTENT_DIR . '/uploads';
    … …  
    21332133                if ( 'wp-content/uploads' == $upload_path ) {
    21342134                        $dir = WP_CONTENT_DIR . '/uploads';
    2135                         $main_override = defined( 'MULTISITE' ) && is_main_site();
    21362135                } elseif ( 0 !== strpos($dir, ABSPATH) ) {
    21372136                        // $dir is absolute, $upload_path is (maybe) relative to ABSPATH
    … …  
    21472146        }
    21482147
    2149         if ( defined('UPLOADS') && ( !$main_override || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) {
     2148        if ( defined('UPLOADS') && !$main_override && ( !isset( $switched ) || $switched === false ) ) {
    21502149                $dir = ABSPATH . UPLOADS;
    21512150                $url = trailingslashit( $siteurl ) . UPLOADS;
    21522151        }
    21532152
    2154         if ( is_multisite() && ( !$main_override || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) {
     2153        if ( is_multisite() && !$main_override && ( !isset( $switched ) || $switched === false ) ) {
    21552154                if ( defined( 'BLOGUPLOADDIR' ) )
    21562155                        $dir = untrailingslashit(BLOGUPLOADDIR);
Note: See TracChangeset for help on using the changeset viewer.