Now tag pretty permalinks should work, and support custom tag bases.

git-svn-id: https://develop.svn.wordpress.org/trunk@5150 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2007-03-31 09:19:32 +00:00
parent 570a74e818
commit a059392772
6 changed files with 61 additions and 8 deletions
+11
View File
@@ -73,10 +73,18 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
$category_base = preg_replace('#/+#', '/', '/' . $_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']);
$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;
@@ -159,6 +167,9 @@ checked="checked"
<?php endif; ?>
<p>
<?php _e('Category base'); ?>: <input name="category_base" type="text" class="code" value="<?php echo attribute_escape($category_base); ?>" size="30" />
</p>
<p>
<?php _e('Tag base'); ?>: <input name="tag_base" type="text" class="code" value="<?php echo attribute_escape($tag_base); ?>" size="30" />
</p>
<p class="submit">
<input type="submit" name="submit" value="<?php _e('Update Permalink Structure &raquo;') ?>" />