Make WordPress Core

Changeset 17513


Ignore:
Timestamp:
03/09/2011 05:19:20 AM (14 years ago)
Author:
markjaquith
Message:

Prevent double index.php preprend on PATHINFO custom taxonomy permalinks. Proper use of with_front. props greuben. fixes #16918. fixes #16622. see #15813. see #12659. For 3.1

Location:
branches/3.1/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/taxonomy.php

    r17495 r17513  
    1616 */
    1717function create_initial_taxonomies() {
     18    global $wp_rewrite;
     19
    1820    register_taxonomy( 'category', 'post', array(
    1921        'hierarchical' => true,
     
    2325                    'hierarchical' => true,
    2426                    'slug' => get_option('category_base') ? get_option('category_base') : 'category',
    25                     'with_front' => false) : false,
     27                    'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
    2628        'public' => true,
    2729        'show_ui' => true,
     
    3537        'rewrite' => did_action( 'init' ) ? array(
    3638                    'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag',
    37                     'with_front' => false) : false,
     39                    'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
    3840        'public' => true,
    3941        'show_ui' => true,
     
    330332
    331333        $wp_rewrite->add_rewrite_tag("%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=");
    332         $wp_rewrite->add_permastruct($taxonomy, "{$wp_rewrite->root}{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']);
     334        $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']);
    333335    }
    334336
  • branches/3.1/wp-includes/version.php

    r17491 r17513  
    3030 * @global int $wp_db_version
    3131 */
    32 $wp_db_version = 17056;
     32$wp_db_version = 17510;
    3333
    3434/**
Note: See TracChangeset for help on using the changeset viewer.