WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/rewrite.php

    r8617 r8213  
    6868  */
    6969function _wp_filter_taxonomy_base( $base ) {
    70     if ( !empty( $base ) ) {
    71         $base = preg_replace( '|^/index\.php/|', '', $base );
    72         $base = trim( $base, '/' );
    73     }
     70    if ( !empty( $base ) )
     71        $base = preg_replace( '|^/index\.php/|', '/', $base );
    7472    return $base;
    7573}
     
    153151
    154152            // Substitute the substring matches into the query.
    155             eval("\$query = \"" . addslashes($query) . "\";");
     153            eval("\$query = \"$query\";");
    156154            // Filter out non-public query vars
    157155            global $wp;
     
    448446
    449447        if (empty($this->category_base))
    450             $this->category_structure = trailingslashit( $this->front . 'category' );
     448            $this->category_structure = $this->front . 'category/';
    451449        else
    452             $this->category_structure = trailingslashit( '/' . $this->root . $this->category_base );
     450            $this->category_structure = $this->category_base . '/';
    453451
    454452        $this->category_structure .= '%category%';
     
    468466
    469467        if (empty($this->tag_base))
    470             $this->tag_structure = trailingslashit( $this->front . 'tag' );
     468            $this->tag_structure = $this->front . 'tag/';
    471469        else
    472             $this->tag_structure = trailingslashit( '/' . $this->root . $this->tag_base );
     470            $this->tag_structure = $this->tag_base . '/';
    473471
    474472        $this->tag_structure .= '%tag%';
     
    996994            $this->root = $this->index . '/';
    997995        }
    998         $this->category_base = get_option( 'category_base' );
    999         $this->tag_base = get_option( 'tag_base' );
     996        $this->category_base = ( ( $this->using_index_permalinks() ) ? '/' . $this->index : '' ) . get_option( 'category_base' );
     997        $this->tag_base = ( ( $this->using_index_permalinks() ) ? '/' . $this->index : '' ) . get_option( 'tag_base' );
    1000998        unset($this->category_structure);
    1001999        unset($this->author_structure);
Note: See TracChangeset for help on using the changeset viewer.