Make WordPress Core

Changeset 14510


Ignore:
Timestamp:
05/07/2010 10:50:05 PM (17 years ago)
Author:
wpmuguru
Message:

add upload dir support to switch to blog, props ocean90, see #11998

File:
1 edited

Legend:

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

    r14502 r14510  
    21152115 */
    21162116function wp_upload_dir( $time = null ) {
     2117        global $switched;
    21172118        $siteurl = get_option( 'siteurl' );
    21182119        $upload_path = get_option( 'upload_path' );
    … …  
    21372138        }
    21382139
    2139         if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) ) {
     2140        if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) {
    21402141                $dir = ABSPATH . UPLOADS;
    21412142                $url = trailingslashit( $siteurl ) . UPLOADS;
    21422143        }
    21432144
    2144         if ( is_multisite() && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) ) {
     2145        if ( is_multisite() && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) {
    21452146                if ( defined( 'BLOGUPLOADDIR' ) )
    21462147                        $dir = untrailingslashit(BLOGUPLOADDIR);
Note: See TracChangeset for help on using the changeset viewer.