From 6cf9ea65b4e5bdfd1acc4de5b67c1ad61be575d3 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Fri, 4 Sep 2009 08:47:36 +0000 Subject: [PATCH] Add a the_terms filter, and use a default ", " sep. props scribu. fixes #10600 git-svn-id: http://svn.automattic.com/wordpress/trunk@11900 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 5ab23960b..344ae4708 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -925,12 +925,13 @@ function get_the_term_list( $id = 0, $taxonomy, $before = '', $sep = '', $after * @param string $after Optional. After list. * @return null|bool False on WordPress error. Returns null when displaying. */ -function the_terms( $id, $taxonomy, $before = '', $sep = '', $after = '' ) { - $return = get_the_term_list( $id, $taxonomy, $before, $sep, $after ); - if ( is_wp_error( $return ) ) +function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) { + $term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after ); + + if ( is_wp_error( $term_list ) ) return false; - else - echo $return; + + echo apply_filters('the_terms', $term_list, $taxonomy, $before, $sep, $after); } /**