Fix regression in get_tag_link() since 4.9.

See [42364] for description of the problem.

Because `get_category_link()` is now totally taxonomy-agnostic, `get_tag_link()`
can become a simple wrapper.

Props juiiee8487, markjaquith.
See #42771.

git-svn-id: https://develop.svn.wordpress.org/trunk@42366 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges
2017-12-04 20:51:27 +00:00
parent 829d8bb179
commit 8951af66d4
2 changed files with 58 additions and 11 deletions
+1 -11
View File
@@ -1111,17 +1111,7 @@ function walk_category_dropdown_tree() {
* @return string Link on success, empty string if tag does not exist.
*/
function get_tag_link( $tag ) {
if ( ! is_object( $tag ) ) {
$tag = (int) $tag;
}
$tag = get_term_link( $tag, 'post_tag' );
if ( is_wp_error( $tag ) ) {
return '';
}
return $tag;
return get_category_link( $tag );
}
/**