WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/31/2007 09:19:32 AM (15 years ago)
Author:
matt
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-permalink.php

    r4681 r5150  
    7474        $wp_rewrite->set_category_base($category_base);
    7575    }
     76
     77    if ( isset($_POST['tag_base']) ) {
     78        $tag_base = $_POST['tag_base'];
     79        if (! empty($tag_base) )
     80            $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']);
     81        $wp_rewrite->set_tag_base($tag_base);
     82    }
    7683}
    7784
    7885$permalink_structure = get_option('permalink_structure');
    7986$category_base = get_option('category_base');
     87$tag_base = get_option( 'tag_base' );
    8088
    8189if ( (!file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess') )
     
    160168    <p>
    161169  <?php _e('Category base'); ?>: <input name="category_base" type="text" class="code"  value="<?php echo attribute_escape($category_base); ?>" size="30" />
     170     </p>
     171      <p>
     172      <?php _e('Tag base'); ?>: <input name="tag_base" type="text" class="code"  value="<?php echo attribute_escape($tag_base); ?>" size="30" />
    162173     </p>
    163174    <p class="submit">
Note: See TracChangeset for help on using the changeset viewer.