[wp-trac] [WordPress Trac] #17308: In order to use a tag_base as-is, category_base needs to be set

WordPress Trac wp-trac at lists.automattic.com
Mon May 2 21:29:52 UTC 2011


#17308: In order to use a tag_base as-is, category_base needs to be set
--------------------------+-----------------
 Reporter:  markjaquith   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  3.2
Component:  Taxonomy      |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17308>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list