From 012d1977e22ee882a570eb625f24b03d5c6cefa1 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 13 Dec 2016 02:56:32 +0000 Subject: [PATCH] Taxonomy: Use `get_term_link()` instead of `get_category_link()` in `get_term_parents_list()`. `get_category_link()` is a wrapper for `get_term_link()`. Using the unwrapped function makes more sense semantically (it's taxonomy- agnostic) and it's also more parsimonious (the `WP_Error` check in `get_category_link()` is redundant with similar checks just before in `get_term_link()`). Props keesiemeijer. Fixes #17069. git-svn-id: https://develop.svn.wordpress.org/trunk@39593 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 4e2f6823af..5987daca82 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -1283,7 +1283,7 @@ function get_term_parents_list( $term_id, $taxonomy, $args = array() ) { $name = ( 'slug' === $args['format'] ) ? $parent->slug : $parent->name; if ( $args['link'] ) { - $list .= '' . $name . '' . $args['separator']; + $list .= '' . $name . '' . $args['separator']; } else { $list .= $name . $args['separator']; }