Changeset 25662 for trunk/src/wp-includes/category.php
- Timestamp:
- 10/02/2013 07:58:50 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/category.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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 '';
Note:
See TracChangeset
for help on using the changeset viewer.