- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/wp-includes/taxonomy.php
r17527 r17444 16 16 */ 17 17 function create_initial_taxonomies() { 18 global $wp_rewrite;19 20 18 register_taxonomy( 'category', 'post', array( 21 19 'hierarchical' => true, … … 25 23 'hierarchical' => true, 26 24 'slug' => get_option('category_base') ? get_option('category_base') : 'category', 27 'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true) : false,25 'with_front' => false) : false, 28 26 'public' => true, 29 27 'show_ui' => true, … … 37 35 'rewrite' => did_action( 'init' ) ? array( 38 36 'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag', 39 'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true) : false,37 'with_front' => false) : false, 40 38 'public' => true, 41 39 'show_ui' => true, … … 332 330 333 331 $wp_rewrite->add_rewrite_tag("%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term="); 334 $wp_rewrite->add_permastruct($taxonomy, "{$ args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']);332 $wp_rewrite->add_permastruct($taxonomy, "{$wp_rewrite->root}{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']); 335 333 } 336 334 … … 890 888 $field = 't.name'; 891 889 } else { 892 $term = get_term( (int) $value, $taxonomy, $output, $filter); 893 if ( is_wp_error( $term ) ) 894 $term = false; 895 return $term; 890 return get_term( (int) $value, $taxonomy, $output, $filter); 896 891 } 897 892 … … 2848 2843 2849 2844 if ( empty($termlink) ) { 2850 if ( 'category' == $taxonomy ) 2851 $termlink = '?cat=' . $term->term_id; 2852 elseif ( $t->query_var ) 2845 if ( $t->query_var ) 2853 2846 $termlink = "?$t->query_var=$slug"; 2854 2847 else
Note: See TracChangeset
for help on using the changeset viewer.