WordPress.org

Make WordPress Core

Changeset 39593


Ignore:
Timestamp:
12/13/16 02:56:32 (12 months ago)
Author:
boonebgorges
Message:

Taxonomy: Use get_term_link() instead of get_category_link() in get_term_parents_list().

get_category_link() is a wrapper for get_term_link(). Using the
unwrapped function makes more sense semantically (it's taxonomy-
agnostic) and it's also more parsimonious (the WP_Error check in
get_category_link() is redundant with similar checks just before
in get_term_link()).

Props keesiemeijer.
Fixes #17069.

File:
1 edited

Legend:

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

    r39549 r39593  
    12841284 
    12851285        if ( $args['link'] ) { 
    1286             $list .= '<a href="' . esc_url( get_category_link( $parent->term_id ) ) . '">' . $name . '</a>' . $args['separator']; 
     1286            $list .= '<a href="' . esc_url( get_term_link( $parent->term_id, $taxonomy ) ) . '">' . $name . '</a>' . $args['separator']; 
    12871287        } else { 
    12881288            $list .= $name . $args['separator']; 
Note: See TracChangeset for help on using the changeset viewer.