Changeset 12860
- Timestamp:
- 01/26/2010 11:02:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-permalink.php
r12789 r12860 83 83 if (! empty($permalink_structure) ) 84 84 $permalink_structure = preg_replace('#/+#', '/', '/' . $_POST['permalink_structure']); 85 if ( is_multisite() && !is_subdomain_install() && $permalink_structure != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path) {85 if ( is_multisite() && !is_subdomain_install() && $permalink_structure != '' && is_main_site() ) { 86 86 $permalink_structure = '/blog' . $permalink_structure; 87 87 } … … 93 93 if (! empty($category_base) ) 94 94 $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']); 95 if ( is_multisite() && !is_subdomain_install() && $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path) {95 if ( is_multisite() && !is_subdomain_install() && $category_base != '' && is_main_site() ) { 96 96 $category_base = '/blog' . $category_base; 97 97 } … … 103 103 if (! empty($tag_base) ) 104 104 $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']); 105 if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path) {105 if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && is_main_site() ) { 106 106 $tag_base = '/blog' . $tag_base; 107 107 } … … 204 204 </th> 205 205 <td> 206 <?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $permalink_structure = str_replace( "/blog", "", $permalink_structure ); }?>206 <?php if ( is_multisite() && !is_subdomain_install() && is_main_site() ) { echo "/blog"; $permalink_structure = preg_replace( "|/?blog|", "", $permalink_structure ); }?> 207 207 <input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr($permalink_structure); ?>" class="regular-text code" /> 208 208 </td> … … 220 220 <tr> 221 221 <th><label for="category_base"><?php /* translators: prefix for category permalinks */ _e('Category base'); ?></label></th> 222 <td><?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?> <input name="category_base" id="category_base" type="text" value="<?php echo esc_attr( $category_base ); ?>" class="regular-text code" /></td>222 <td><?php if ( is_multisite() && !is_subdomain_install() && is_main_site() ) { echo "/blog"; $category_base = preg_replace( "|^/?blog|", "", $category_base ); }?> <input name="category_base" id="category_base" type="text" value="<?php echo esc_attr( $category_base ); ?>" class="regular-text code" /></td> 223 223 </tr> 224 224 <tr> 225 225 <th><label for="tag_base"><?php _e('Tag base'); ?></label></th> 226 <td><?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $tag_base = str_replace( "/blog", "", $tag_base ); }?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>226 <td><?php if ( is_multisite() && !is_subdomain_install() && is_main_site() ) { echo "/blog"; $tag_base = preg_replace( "|/?blog|", "", $tag_base ); }?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td> 227 227 </tr> 228 228 <?php do_settings_fields('permalink', 'optional'); ?>
Note: See TracChangeset
for help on using the changeset viewer.