Changeset 25662
- Timestamp:
- 10/02/2013 07:58:50 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/taxonomy.php
r23563 r25662 35 35 */ 36 36 function get_category_to_edit( $id ) { 37 $category = get_category( $id, OBJECT, 'edit' ); 37 $category = get_term( $id, 'category', OBJECT, 'edit' ); 38 _make_cat_compat( $category ); 38 39 return $category; 39 40 } … … 156 157 157 158 // First, get all of the original fields 158 $category = get_category($cat_ID, ARRAY_A); 159 $category = get_term( $cat_ID, 'category', ARRAY_A ); 160 _make_cat_compat( $category ); 159 161 160 162 // Escape data pulled from DB. -
trunk/src/wp-includes/category-template.php
r25641 r25662 42 42 function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) { 43 43 $chain = ''; 44 $parent = get_ category( $id);44 $parent = get_term( $id, 'category' ); 45 45 if ( is_wp_error( $parent ) ) 46 46 return $parent; … … 136 136 function get_the_category_by_ID( $cat_ID ) { 137 137 $cat_ID = (int) $cat_ID; 138 $category = get_ category( $cat_ID);138 $category = get_term( $cat_ID, 'category' ); 139 139 if ( is_wp_error( $category ) ) 140 140 return $category; -
trunk/src/wp-includes/category.php
r22634 r25662 134 134 } 135 135 136 if ( $path == $full_path ) 137 return get_category( $category->term_id, $output ); 136 if ( $path == $full_path ) { 137 $category = get_term( $category->term_id, 'category', $output ); 138 _make_cat_compat( $category ); 139 return $category; 140 } 138 141 } 139 142 140 143 // If full matching is not required, return the first cat that matches the leaf. 141 if ( ! $full_match ) 142 return get_category( $categories[0]->term_id, $output ); 144 if ( ! $full_match ) { 145 $category = get_term( reset( $categories )->term_id, 'category', $output ); 146 _make_cat_compat( $category ); 147 return $category; 148 } 143 149 144 150 return null; … … 186 192 function get_cat_name( $cat_id ) { 187 193 $cat_id = (int) $cat_id; 188 $category = get_ category( $cat_id);194 $category = get_term( $cat_id, 'category' ); 189 195 if ( ! $category || is_wp_error( $category ) ) 190 196 return ''; -
trunk/src/wp-includes/link-template.php
r25570 r25662 132 132 // having to assign it explicitly 133 133 if ( empty($category) ) { 134 $default_category = get_ category( get_option( 'default_category' ));134 $default_category = get_term( get_option( 'default_category' ), 'category' ); 135 135 $category = is_wp_error( $default_category ) ? '' : $default_category->slug; 136 136 }
Note: See TracChangeset
for help on using the changeset viewer.