From f2d7699045410a10ade7a42cd1e595c8d2bc6d60 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 26 Mar 2008 18:26:22 +0000 Subject: [PATCH] get_term_link() fixes for core taxonomies. Props andy. see #6357 git-svn-id: http://svn.automattic.com/wordpress/trunk@7526 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 588a9a5b0..a6ef8f054 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1940,6 +1940,12 @@ function _update_post_term_count( $terms ) { function get_term_link( $term, $taxonomy ) { global $wp_rewrite; + // use legacy functions for core taxonomies until they are fully plugged in + if ( $taxonomy == 'category' ) + return get_category_link($term); + if ( $taxonomy == 'post_tag' ) + return get_tag_link($term); + $termlink = $wp_rewrite->get_extra_permastruct($taxonomy); if ( !is_object($term) ) { @@ -1993,7 +1999,7 @@ function get_the_taxonomies($post = 0) { if ( !$post ) return $taxonomies; - $_template = '%s: %l.'; + $template = apply_filters('taxonomy_template', '%s: %l.'); foreach ( get_object_taxonomies($post) as $taxonomy ) { $t = (array) get_taxonomy($taxonomy); @@ -2002,7 +2008,7 @@ function get_the_taxonomies($post = 0) { if ( empty($t['args']) ) $t['args'] = array(); if ( empty($t['template']) ) - $t['template'] = $_template; + $t['template'] = $template; $terms = get_object_term_cache($post->ID, $taxonomy); if ( empty($terms) )