diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0965dbe3b9..5db7e4adcf 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1554,7 +1554,7 @@ function wp_upload_dir( $time = null ) { } // If multisite (and if not the main site in a post-MU network) - if ( is_multisite() && ! ( is_main_site() && defined( 'MULTISITE' ) ) ) { + if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) { if ( ! get_site_option( 'ms_files_rewriting' ) ) { // If ms-files rewriting is disabled (networks created post-3.5), it is fairly straightforward: