Changeset 11141
- Timestamp:
- 04/30/2009 07:05:32 PM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
-
classes.php (modified) (1 diff)
-
query.php (modified) (2 diffs)
-
taxonomy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r11109 r11141 254 254 255 255 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) 256 if ( isset($t->query_var))256 if ( $t->query_var ) 257 257 $taxonomy_query_vars[$t->query_var] = $taxonomy; 258 258 -
trunk/wp-includes/query.php
r11121 r11141 1400 1400 $this->is_tax = false; 1401 1401 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { 1402 if ( isset($t->query_var)&& isset($qv[$t->query_var]) && '' != $qv[$t->query_var] ) {1402 if ( $t->query_var && isset($qv[$t->query_var]) && '' != $qv[$t->query_var] ) { 1403 1403 $qv['taxonomy'] = $taxonomy; 1404 1404 $qv['term'] = $qv[$t->query_var]; … … 1939 1939 } else { 1940 1940 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { 1941 if ( isset($t->query_var)&& '' != $q[$t->query_var] ) {1941 if ( $t->query_var && '' != $q[$t->query_var] ) { 1942 1942 $terms = get_terms($taxonomy, array('slug'=>$q[$t->query_var])); 1943 1943 if ( !is_wp_error($terms) ) -
trunk/wp-includes/taxonomy.php
r11140 r11141 16 16 */ 17 17 function create_initial_taxonomies() { 18 register_taxonomy( 'category', 'post', array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => __('Categories') ) ) ;19 register_taxonomy( 'post_tag', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __('Post Tags') ) ) ;20 register_taxonomy( 'link_category', 'link', array('hierarchical' => false ) ) ;18 register_taxonomy( 'category', 'post', array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; 19 register_taxonomy( 'post_tag', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __('Post Tags'), 'query_var' => false, 'rewrite' => false) ) ; 20 register_taxonomy( 'link_category', 'link', array('hierarchical' => false, 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; 21 21 } 22 22 add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
Note: See TracChangeset
for help on using the changeset viewer.