From 0c8a8c36557f0822f8dd225c9fde1ffe4a2ea34d Mon Sep 17 00:00:00 2001 From: scribu Date: Wed, 1 Dec 2010 20:16:24 +0000 Subject: [PATCH] Get rid of misplaced 'taxonomy_template' filter. Fixes #14740 git-svn-id: http://svn.automattic.com/wordpress/trunk@16665 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 633948667a..5f9eb6d44f 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2775,6 +2775,7 @@ function get_term_link( $term, $taxonomy = '') { * 'before' : default is empty string. Display before taxonomies list. * 'sep' : default is empty string. Separate every taxonomy with value in this. * 'after' : default is empty string. Display this after the taxonomies list. + * 'template' : The template to use for displaying the taxonomy terms. * * @since 2.5.0 * @uses get_the_taxonomies() @@ -2787,12 +2788,13 @@ function the_taxonomies($args = array()) { 'before' => '', 'sep' => ' ', 'after' => '', + 'template' => '%s: %l.' ); $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); - echo $before . join($sep, get_the_taxonomies($post)) . $after; + echo $before . join($sep, get_the_taxonomies($post, $template)) . $after; } /** @@ -2804,9 +2806,10 @@ function the_taxonomies($args = array()) { * @since 2.5.0 * * @param int $post Optional. Post ID or will use Global Post ID (in loop). + * @param string $template Optional. The template to use for displaying the taxonomy terms. * @return array */ -function get_the_taxonomies($post = 0) { +function get_the_taxonomies($post = 0, $template = '%s: %l.') { if ( is_int($post) ) $post =& get_post($post); elseif ( !is_object($post) ) @@ -2817,8 +2820,6 @@ function get_the_taxonomies($post = 0) { if ( !$post ) return $taxonomies; - $template = apply_filters('taxonomy_template', '%s: %l.'); - foreach ( get_object_taxonomies($post) as $taxonomy ) { $t = (array) get_taxonomy($taxonomy); if ( empty($t['label']) )