From 3a4570b0fc8b3d6339bef71d17d7701554e0bbf7 Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 12 Oct 2007 16:21:15 +0000 Subject: Merge with WP 2.3 - testing use only! Move pluggable functions out of wpmu-functions and into pluggable.php, fixes #439 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1069 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/options-permalink.php | 44 ++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 15 deletions(-) (limited to 'wp-admin/options-permalink.php') diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 75792db..e4361b1 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -79,10 +79,21 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) { } $wp_rewrite->set_category_base($category_base); } + + if ( isset($_POST['tag_base']) ) { + $tag_base = $_POST['tag_base']; + if (! empty($tag_base) ) + $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']); + if( $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { + $tag_base = '/blog' . $tag_base; + } + $wp_rewrite->set_tag_base($tag_base); + } } $permalink_structure = get_option('permalink_structure'); $category_base = get_option('category_base'); +$tag_base = get_option( 'tag_base' ); if ( (!file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess') ) $writable = true; @@ -99,16 +110,16 @@ $wp_rewrite->flush_rules();

-
-

-
+
+

+

URLs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.'); ?>

@@ -153,17 +164,20 @@ checked="checked"

-

URLs here. For example, /taxonomy/tags would make your category links like http://example.org/taxonomy/tags/uncategorized/. If you leave this blank the default will be used.') ?>

+

URLs here. For example, using /topics/ as your category base would make your category links like http://example.org/topics/uncategorized/. If you leave these blank the defaults will be used.') ?>

-

URLs here. For example, /index.php/taxonomy/tags would make your category links like http://example.org/index.php/taxonomy/tags/uncategorized/. If you leave this blank the default will be used.') ?>

+

URLs here. For example, using /topics/ as your category base would make your category links like http://example.org/index.php/topics/uncategorized/. If you leave these blank the defaults will be used.') ?>

-

- : domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?> -

-

- -

- +

+ : domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?> +

+

+ : domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $tag_base = str_replace( "/blog", "", $tag_base ); }?> +

+

+ +

+

.htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.') ?>

-- cgit