WordPress.org

Make WordPress Core

Ticket #11998: 11998.patch

File 11998.patch, 922 bytes (added by ocean90, 8 years ago)
  • wp-includes/functions.php

     
    21362136                        $url = trailingslashit( $siteurl ) . $upload_path;
    21372137        }
    21382138
    2139         if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) ) {
     2139        if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && $GLOBALS['switched'] === false ) {
    21402140                $dir = ABSPATH . UPLOADS;
    21412141                $url = trailingslashit( $siteurl ) . UPLOADS;
    21422142        }
    21432143
    2144         if ( is_multisite() && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) ) {
     2144        if ( is_multisite() && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && $GLOBALS['switched'] === false ) {
    21452145                if ( defined( 'BLOGUPLOADDIR' ) )
    21462146                        $dir = untrailingslashit(BLOGUPLOADDIR);
    21472147                $url = str_replace( UPLOADS, 'files', $url );