From aedaea92093184e909b0bf3d5fcd55c58fcbbe17 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 4 Dec 2017 21:58:42 +0000 Subject: [PATCH] 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. Merges [42366] to the 4.9 branch. Props juiiee8487, markjaquith. See #42771. Built from https://develop.svn.wordpress.org/branches/4.9@42370 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42199 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 46e53be683..6e9d40447c 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -1065,15 +1065,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 ); } /**