Make WordPress Core

Changeset 42366


Ignore:
Timestamp:
12/04/2017 08:51:27 PM (7 years ago)
Author:
boonebgorges
Message:

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.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r42364 r42366  
    11121112 */
    11131113function get_tag_link( $tag ) {
    1114     if ( ! is_object( $tag ) ) {
    1115         $tag = (int) $tag;
    1116     }
    1117 
    1118     $tag = get_term_link( $tag, 'post_tag' );
    1119 
    1120     if ( is_wp_error( $tag ) ) {
    1121         return '';
    1122     }
    1123 
    1124     return $tag;
     1114    return get_category_link( $tag );
    11251115}
    11261116
Note: See TracChangeset for help on using the changeset viewer.