Ticket #5050: the_category_enhancement.diff
| File the_category_enhancement.diff, 0.9 kB (added by filosofo, 1 year ago) |
|---|
-
wp-includes/category-template.php
old new 109 109 return $category->name; 110 110 } 111 111 112 function get_the_category_list($separator = '', $parents='' ) {112 function get_the_category_list($separator = '', $parents='', $post_id = false) { 113 113 global $wp_rewrite; 114 $categories = get_the_category( );114 $categories = get_the_category($post_id); 115 115 if (empty($categories)) 116 116 return apply_filters('the_category', __('Uncategorized'), $separator, $parents); 117 117 … … 179 179 return false; 180 180 } 181 181 182 function the_category($separator = '', $parents='' ) {183 echo get_the_category_list($separator, $parents );182 function the_category($separator = '', $parents='', $post_id = false) { 183 echo get_the_category_list($separator, $parents, $post_id); 184 184 } 185 185 186 186 function category_description($category = 0) {
