Make WordPress Core

Ticket #42771: 42771.1-tag-specific.diff

File 42771.1-tag-specific.diff, 572 bytes (added by juiiee8487, 8 years ago)

Created patch for tag specific function to make more simplify.

  • wp-includes/category-template.php

    diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php
    index 302aa03..a19d4ac 100644
    a b function walk_category_dropdown_tree() { 
    10651065 * @return string Link on success, empty string if tag does not exist.
    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
    10791071/**