Ticket #15407: 15407.diff
File 15407.diff, 787 bytes (added by , 13 years ago) |
---|
-
wp-includes/category-template.php
64 64 * @return array 65 65 */ 66 66 function get_the_category( $id = false ) { 67 $categories = get_the_terms( $id, 'category' );67 $categories = (array) get_the_terms( $id, 'category' ); 68 68 69 foreach ( array_keys( (array) $categories ) as $key ) { 70 _make_cat_compat( $categories[$key] ); 69 if ( $categories ) { 70 foreach ( array_keys( $categories ) as $key ) { 71 _make_cat_compat( $categories[$key] ); 72 } 71 73 } 74 72 75 // Filter name is plural because we are return alot of categories not just one 73 76 return apply_filters( 'get_the_categories', $categories ); 74 77 }