mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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 »') ?>" />
|
||||
|
||||
Reference in New Issue
Block a user