Add get_the_category_list(). http://mosquito.wordpress.org/view.php?id=970 Hat tip: nbachiyski

git-svn-id: http://svn.automattic.com/wordpress/trunk@2379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-02-25 15:50:55 +00:00
parent 9da4d0f021
commit eb8369937f
1 changed files with 7 additions and 4 deletions

View File

@ -46,11 +46,10 @@ function get_category_link($category_id) {
return apply_filters('category_link', $catlink, $category_id); return apply_filters('category_link', $catlink, $category_id);
} }
function the_category($separator = '', $parents='') { function get_the_category_list($separator = '', $parents='') {
$categories = get_the_category(); $categories = get_the_category();
if (empty($categories)) { if (empty($categories)) {
_e('Uncategorized'); return apply_filters('the_category', __('Uncategorized'), $separator, $parents);
return;
} }
$thelist = ''; $thelist = '';
@ -101,7 +100,11 @@ function the_category($separator = '', $parents='') {
++$i; ++$i;
} }
} }
echo apply_filters('the_category', $thelist, $separator, $parents); return apply_filters('the_category', $thelist, $separator, $parents);
}
function the_category($separator = '', $parents='') {
echo get_the_category_list($separator, $parents);
} }
function get_the_category_by_ID($cat_ID) { function get_the_category_by_ID($cat_ID) {