Make WordPress Core

Changeset 42370


Ignore:
Timestamp:
12/04/2017 09:57:28 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.

Merges [42366] to the 4.9 branch.

Props juiiee8487, markjaquith.
See #42771.

Location:
branches/4.9
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/category-template.php

    r42369 r42370  
    10661066 */
    10671067function get_tag_link( $tag ) {
    1068     if ( ! is_object( $tag ) )
    1069         $tag = (int) $tag;
    1070 
    1071     $tag = get_term_link( $tag, 'post_tag' );
    1072 
    1073     if ( is_wp_error( $tag ) )
    1074         return '';
    1075 
    1076     return $tag;
     1068    return get_category_link( $tag );
    10771069}
    10781070
Note: See TracChangeset for help on using the changeset viewer.