Changeset 13980
- Timestamp:
- 04/04/2010 12:41:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-permalink.php
r13750 r13980 79 79 check_admin_referer('update-permalink'); 80 80 81 if ( isset( $_POST['permalink_structure']) ) {81 if ( isset( $_POST['permalink_structure'] ) ) { 82 82 $permalink_structure = $_POST['permalink_structure']; 83 if ( ! empty($permalink_structure) )84 $permalink_structure = preg_replace( '#/+#', '/', '/' . $_POST['permalink_structure']);85 if ( is_multisite() && !is_subdomain_install() && $permalink_structure != '' && is_main_site() ) {86 $permalink_structure = '/blog' . $permalink_structure;83 if ( ! empty( $permalink_structure ) ) { 84 $permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) ); 85 if ( is_multisite() && ! is_subdomain_install() && is_main_site() ) 86 $permalink_structure = '/blog' . $permalink_structure; 87 87 } 88 $wp_rewrite->set_permalink_structure( $permalink_structure);89 } 90 91 if ( isset( $_POST['category_base']) ) {88 $wp_rewrite->set_permalink_structure( $permalink_structure ); 89 } 90 91 if ( isset( $_POST['category_base'] ) ) { 92 92 $category_base = $_POST['category_base']; 93 if (! empty( $category_base) )94 $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']);95 if ( is_multisite() && !is_subdomain_install() && $category_base != '' && is_main_site() ) {96 $category_base = '/blog' . $category_base;93 if (! empty( $category_base ) ) { 94 $category_base = preg_replace('#/+#', '/', '/' . str_replace( '#', '', $category_base ) ); 95 if ( is_multisite() && ! is_subdomain_install() && is_main_site() ) 96 $category_base = '/blog' . $category_base; 97 97 } 98 $wp_rewrite->set_category_base( $category_base);99 } 100 101 if ( isset( $_POST['tag_base']) ) {98 $wp_rewrite->set_category_base( $category_base ); 99 } 100 101 if ( isset( $_POST['tag_base'] ) ) { 102 102 $tag_base = $_POST['tag_base']; 103 if ( ! empty($tag_base) )104 $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']);105 if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && is_main_site() ) {106 $tag_base = '/blog' . $tag_base;103 if ( ! empty( $tag_base ) ) { 104 $tag_base = preg_replace('#/+#', '/', '/' . str_replace( '#', '', $tag_base ) ); 105 if ( is_multisite() && ! is_subdomain_install() && is_main_site() ) 106 $tag_base = '/blog' . $tag_base; 107 107 } 108 $wp_rewrite->set_tag_base( $tag_base);108 $wp_rewrite->set_tag_base( $tag_base ); 109 109 } 110 110 }
Note: See TracChangeset
for help on using the changeset viewer.