Changeset 34749
- Timestamp:
- 10/01/2015 08:38:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options-permalink.php
r34691 r34749 51 51 $home_path = get_home_path(); 52 52 $iis7_permalinks = iis7_supports_permalinks(); 53 $permalink_structure = get_option( 'permalink_structure' ); 53 54 54 55 $prefix = $blog_prefix = ''; 55 56 if ( ! got_url_rewrite() ) 56 57 $prefix = '/index.php'; 57 if ( is_multisite() && !is_subdomain_install() && is_main_site() ) 58 59 /** 60 * In a subdirectory configuration of multisite, the `/blog` prefix is used by 61 * default on the main site to avoid collisions with other sites created on that 62 * network. If the `permalink_structure` option has been changed to remove this 63 * base prefix, WordPress core can no longer account for the possible collision. 64 */ 65 if ( is_multisite() && ! is_subdomain_install() && is_main_site() && 0 === strpos( $permalink_structure, '/blog/' ) ) { 58 66 $blog_prefix = '/blog'; 67 } 59 68 60 69 if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) { … … 95 104 } 96 105 97 $permalink_structure = get_option( 'permalink_structure' );98 106 $category_base = get_option( 'category_base' ); 99 107 $tag_base = get_option( 'tag_base' ); … … 163 171 164 172 <?php 165 if ( is_multisite() && ! is_subdomain_install() && is_main_site() ) {173 if ( is_multisite() && ! is_subdomain_install() && is_main_site() && 0 === strpos( $permalink_structure, '/blog/' ) ) { 166 174 $permalink_structure = preg_replace( '|^/?blog|', '', $permalink_structure ); 167 175 $category_base = preg_replace( '|^/?blog|', '', $category_base );
Note: See TracChangeset
for help on using the changeset viewer.