Changeset 16334 for trunk/wp-includes/category-template.php
- Timestamp:
- 11/12/2010 09:53:15 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r16332 r16334 58 58 * Retrieve post categories. 59 59 * 60 * @since 3.1 60 * @since 0.71 61 * @uses $post 61 62 * 62 63 * @param int $id Optional, default to current post ID. The post ID. 63 64 * @return array 64 65 */ 65 function get_the_categor ies( $id = false ) {66 function get_the_category( $id = false ) { 66 67 $categories = get_the_terms( $id, 'category' ); 67 68 … … 69 70 _make_cat_compat( $categories[$key] ); 70 71 } 71 72 // Filter name is plural because we are return alot of categories not just one 72 73 return apply_filters( 'get_the_categories', $categories ); 73 74 } … … 140 141 function get_the_category_list( $separator = '', $parents='', $post_id = false ) { 141 142 global $wp_rewrite; 142 $categories = get_the_categor ies( $post_id );143 $categories = get_the_category( $post_id ); 143 144 if ( !is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) ) 144 145 return apply_filters( 'the_category', '', $separator, $parents );
Note: See TracChangeset
for help on using the changeset viewer.