Changeset 16334
- Timestamp:
- 11/12/2010 09:53:15 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-posts-list-table.php
r16332 r16334 597 597 ?> 598 598 <td <?php echo $attributes ?>><?php 599 $categories = get_the_categor ies();599 $categories = get_the_category(); 600 600 if ( !empty( $categories ) ) { 601 601 $out = array(); -
trunk/wp-content/themes/twentyten/loop.php
r16332 r16334 142 142 143 143 <div class="entry-utility"> 144 <?php if ( count( get_the_categor ies() ) ) : ?>144 <?php if ( count( get_the_category() ) ) : ?> 145 145 <span class="cat-links"> 146 146 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> -
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 ); -
trunk/wp-includes/deprecated.php
r16332 r16334 73 73 * @since 0.71 74 74 * @deprecated 0.71 75 * @deprecated use get_the_categor ies()76 * @see get_the_categor ies()75 * @deprecated use get_the_category() 76 * @see get_the_category() 77 77 * 78 78 * @param bool $echo … … 80 80 */ 81 81 function the_category_ID($echo = true) { 82 _deprecated_function( __FUNCTION__, '0.71', 'get_the_categor ies()' );82 _deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' ); 83 83 84 84 // Grab the first cat in the list. 85 $categories = get_the_categor ies();85 $categories = get_the_category(); 86 86 $cat = $categories[0]->term_id; 87 87 … … 109 109 110 110 // Grab the first cat in the list. 111 $categories = get_the_categor ies();111 $categories = get_the_category(); 112 112 $currentcat = $categories[0]->category_id; 113 113 if ( $currentcat != $previouscat ) { … … 2557 2557 return false; 2558 2558 } 2559 2560 /**2561 * Retrieve post categories.2562 *2563 * @since 0.712564 * @uses $post2565 * @deprecated 3.12566 * @deprecated Use get_post_categories() instead.2567 *2568 * @param int $id Optional, default to current post ID. The post ID.2569 * @return array2570 */2571 function get_the_category( $id = false ) {2572 _deprecated_function( __FUNCTION__, '3.1', 'get_the_categories()' );2573 return get_the_categories( $id );2574 } -
trunk/wp-includes/feed.php
r16332 r16334 300 300 if ( empty($type) ) 301 301 $type = get_default_feed(); 302 $categories = get_the_categor ies();302 $categories = get_the_category(); 303 303 $tags = get_the_tags(); 304 304 $the_list = ''; -
trunk/wp-includes/link-template.php
r16332 r16334 120 120 $category = ''; 121 121 if ( strpos($permalink, '%category%') !== false ) { 122 $cats = get_the_categor ies($post->ID);122 $cats = get_the_category($post->ID); 123 123 if ( $cats ) { 124 124 usort($cats, '_usort_terms_by_ID'); // order by ID -
trunk/wp-includes/post-template.php
r16332 r16334 350 350 // Categories 351 351 if ( is_object_in_taxonomy( $post->post_type, 'category' ) ) { 352 foreach ( (array) get_the_categor ies($post->ID) as $cat ) {352 foreach ( (array) get_the_category($post->ID) as $cat ) { 353 353 if ( empty($cat->slug ) ) 354 354 continue;
Note: See TracChangeset
for help on using the changeset viewer.