Changeset 11450 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 05/24/2009 11:47:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r11428 r11450 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'), '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) ) ; 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 … … 168 168 global $wp_taxonomies, $wp_rewrite, $wp; 169 169 170 if (!is_array($wp_taxonomies)) 170 if (!is_array($wp_taxonomies)) 171 171 $wp_taxonomies = array(); 172 172 … … 526 526 * the $args. 527 527 * 528 * The 'get_terms_orderby' filter passes the ORDER BY clause for the query 528 * The 'get_terms_orderby' filter passes the ORDER BY clause for the query 529 529 * along with the $args array. 530 530 … … 534 534 * The list of arguments that $args can contain, which will overwrite the defaults: 535 535 * 536 * orderby - Default is 'name'. Can be name, count, term_group, slug or nothing 536 * orderby - Default is 'name'. Can be name, count, term_group, slug or nothing 537 537 * (will use term_id), Passing a custom value other than these will cause it to 538 538 * order based on the custom value. 539 * 539 * 540 540 * order - Default is ASC. Can use DESC. 541 541 * … … 681 681 else if ( 'term_group' == $_orderby ) 682 682 $orderby = 't.term_group'; 683 elseif ( empty($_orderby) || 'id' == $_orderby ) 683 elseif ( empty($_orderby) || 'id' == $_orderby ) 684 684 $orderby = 't.term_id'; 685 685 … … 872 872 873 873 $term = trim( stripslashes( $term ) ); 874 874 875 875 if ( '' === $slug = sanitize_title($term) ) 876 876 return 0;
Note: See TracChangeset
for help on using the changeset viewer.