Changeset 22106 for trunk/wp-includes/functions.php
- Timestamp:
- 10/03/2012 06:57:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r22094 r22106 1510 1510 1511 1511 // If multisite (if not the main site in a post-MU network) 1512 if ( is_multisite() && ! ( is_main_site() && defined( 'MULTISITE' ) ) ) { 1512 $blog_id = get_current_blog_id(); 1513 if ( is_multisite() && ! ( is_main_site( $blog_id ) && defined( 'MULTISITE' ) ) ) { 1513 1514 1514 1515 if ( ! get_site_option( 'ms_files_rewriting' ) ) { 1515 1516 // Append sites/%d if we're not on the main site (for post-MU networks). The extra directory 1516 // prevents a four-digit ID from conflict with a year-based directory for the main site.1517 // If a MU-era network disablesms-files rewriting manually, they don't need the extra1517 // prevents a four-digit ID from conflicting with a year-based directory for the main site. 1518 // But if a MU-era network has disabled ms-files rewriting manually, they don't need the extra 1518 1519 // directory, as they never had wp-content/uploads for the main site. 1519 1520 1520 if ( defined( 'MULTISITE' ) ) 1521 $ms_dir = '/sites/' . get_current_blog_id(); 1522 else 1523 $ms_dir = '/' . get_current_blog_id(); 1524 1525 $dir .= $ms_dir; 1526 $url .= $ms_dir; 1521 $ms_dir = defined( 'MULTISITE' ) ? '/sites/' : '/'; 1522 $dir .= $ms_dir . $blog_id; 1523 $url .= $ms_dir . $blog_id; 1527 1524 } elseif ( ! ms_is_switched() ) { 1528 1525 // Handle the old-form ms-files.php rewriting if the network still has that enabled.
Note: See TracChangeset
for help on using the changeset viewer.