From f0b153775a8ac137296c858c8e986a1b0197be07 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 25 Feb 2005 15:50:55 +0000 Subject: [PATCH] Add get_the_category_list(). http://mosquito.wordpress.org/view.php?id=970 Hat tip: nbachiyski git-svn-id: https://develop.svn.wordpress.org/trunk@2379 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-category.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index 1a68794b3e..d7c70581a9 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -46,11 +46,10 @@ function get_category_link($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(); if (empty($categories)) { - _e('Uncategorized'); - return; + return apply_filters('the_category', __('Uncategorized'), $separator, $parents); } $thelist = ''; @@ -101,7 +100,11 @@ function the_category($separator = '', $parents='') { ++$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) {