Opened 15 years ago
Closed 15 years ago
#17308 closed defect (bug) (fixed)
In order to use a tag_base as-is, category_base needs to be set
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.2 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Taxonomy | Keywords: | |
| Focuses: | Cc: |
Description
In order to have a tag_base be used without with_front, you have to set category_base, due to what appears to be a copy/paste error:
register_taxonomy( 'category', 'post', array(
'hierarchical' => true,
'update_count_callback' => '_update_post_term_count',
'query_var' => 'category_name',
'rewrite' => did_action( 'init' ) ? array(
'hierarchical' => true,
'slug' => get_option('category_base') ? get_option('category_base') : 'category',
'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
'public' => true,
'show_ui' => true,
'_builtin' => true,
) );
register_taxonomy( 'post_tag', 'post', array(
'hierarchical' => false,
'update_count_callback' => '_update_post_term_count',
'query_var' => 'tag',
'rewrite' => did_action( 'init' ) ? array(
'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag',
'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
'public' => true,
'show_ui' => true,
'_builtin' => true,
) );
Expected: it goes off the presence of a tag_base for tags.
Change History (1)
Note: See
TracTickets for help on using
tickets.
In [17789]: