Changes from trunk/wp-includes/rewrite.php at r8213 to branches/2.6/wp-includes/rewrite.php at r8617
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/wp-includes/rewrite.php
r8213 r8617 68 68 */ 69 69 function _wp_filter_taxonomy_base( $base ) { 70 if ( !empty( $base ) ) 71 $base = preg_replace( '|^/index\.php/|', '/', $base ); 70 if ( !empty( $base ) ) { 71 $base = preg_replace( '|^/index\.php/|', '', $base ); 72 $base = trim( $base, '/' ); 73 } 72 74 return $base; 73 75 } … … 151 153 152 154 // Substitute the substring matches into the query. 153 eval("\$query = \" $query\";");155 eval("\$query = \"" . addslashes($query) . "\";"); 154 156 // Filter out non-public query vars 155 157 global $wp; … … 446 448 447 449 if (empty($this->category_base)) 448 $this->category_structure = $this->front . 'category/';450 $this->category_structure = trailingslashit( $this->front . 'category' ); 449 451 else 450 $this->category_structure = $this->category_base . '/';452 $this->category_structure = trailingslashit( '/' . $this->root . $this->category_base ); 451 453 452 454 $this->category_structure .= '%category%'; … … 466 468 467 469 if (empty($this->tag_base)) 468 $this->tag_structure = $this->front . 'tag/';470 $this->tag_structure = trailingslashit( $this->front . 'tag' ); 469 471 else 470 $this->tag_structure = $this->tag_base . '/';472 $this->tag_structure = trailingslashit( '/' . $this->root . $this->tag_base ); 471 473 472 474 $this->tag_structure .= '%tag%'; … … 994 996 $this->root = $this->index . '/'; 995 997 } 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' );998 $this->category_base = get_option( 'category_base' ); 999 $this->tag_base = get_option( 'tag_base' ); 998 1000 unset($this->category_structure); 999 1001 unset($this->author_structure);
Note: See TracChangeset
for help on using the changeset viewer.