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
This commit is contained in:
ryan 2009-11-19 22:41:53 +00:00
parent 492be21173
commit 1d3d70d375
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}