Changeset 12712 for trunk/wp-admin/options-permalink.php
- Timestamp:
- 01/12/2010 09:11:52 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin
-
Property
svn:ignore
set to
.categories.php.swp
-
Property
svn:ignore
set to
-
trunk/wp-admin/options-permalink.php
r12546 r12712 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 ) { 86 $permalink_structure = '/blog' . $permalink_structure; 87 } 85 88 $wp_rewrite->set_permalink_structure($permalink_structure); 86 89 } … … 90 93 if (! empty($category_base) ) 91 94 $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']); 95 if ( is_miltisite() && !is_subdomain_install() && $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 96 $category_base = '/blog' . $category_base; 97 } 92 98 $wp_rewrite->set_category_base($category_base); 93 99 } … … 97 103 if (! empty($tag_base) ) 98 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 ) { 106 $tag_base = '/blog' . $tag_base; 107 } 99 108 $wp_rewrite->set_tag_base($tag_base); 100 109 } … … 195 204 </th> 196 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 ); }?> 197 207 <input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr($permalink_structure); ?>" class="regular-text code" /> 198 208 </td> … … 210 220 <tr> 211 221 <th><label for="category_base"><?php _e('Category base'); ?></label></th> 212 <td>< 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() && $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> 213 223 </tr> 214 224 <tr> 215 225 <th><label for="tag_base"><?php _e('Tag base'); ?></label></th> 216 <td>< 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() && $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> 217 227 </tr> 218 228 <?php do_settings_fields('permalink', 'optional'); ?> … … 225 235 </p> 226 236 </form> 237 <?php if ( !is_multisite || is_super_admin() ) { ?> 227 238 <?php if ($iis7_permalinks) : 228 239 if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) : … … 252 263 <?php endif; ?> 253 264 <?php endif; ?> 265 <?php } // multisite ?> 254 266 255 267 </div>
Note: See TracChangeset
for help on using the changeset viewer.