From 1d3d70d3756955c2a6011e197a438863321031c8 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 19 Nov 2009 22:41:53 +0000 Subject: [PATCH] Fix custom taxonomy term links when using non-pretty permalinks. Props bookchiq. fixes #11179 git-svn-id: http://svn.automattic.com/wordpress/trunk@12229 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index bac056265d..258b9b85e1 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2216,7 +2216,7 @@ function get_term_link( $term, $taxonomy ) { $slug = $term->slug; if ( empty($termlink) ) { - $file = get_option('home') . '/'; + $file = trailingslashit( get_option('home') ); $t = get_taxonomy($taxonomy); if ( $t->query_var ) $termlink = "$file?$t->query_var=$slug"; @@ -2224,7 +2224,7 @@ function get_term_link( $term, $taxonomy ) { $termlink = "$file?taxonomy=$taxonomy&term=$slug"; } else { $termlink = str_replace("%$taxonomy%", $slug, $termlink); - $termlink = get_option('home') . user_trailingslashit($termlink, 'category'); + $termlink = trailingslashit( get_option('home') ) . user_trailingslashit($termlink, 'category'); } return apply_filters('term_link', $termlink, $term, $taxonomy); }