WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/07/2010 04:29:00 AM (9 years ago)
Author:
markjaquith
Message:

Make the second (taxonomy) parameter for get_term_link() optional if you pass in a term object as the first argument (which has the taxonomy in it). fixes #13081. props scribu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r15409 r15586  
    13411341        extract($args);
    13421342
    1343         $cat_name = esc_attr( $category->name);
     1343        $cat_name = esc_attr( $category->name );
    13441344        $cat_name = apply_filters( 'list_cats', $cat_name, $category );
    1345         $link = '<a href="' . get_term_link( $category, $category->taxonomy ) . '" ';
     1345        $link = '<a href="' . esc_attr( get_term_link($category) ) . '" ';
    13461346        if ( $use_desc_for_title == 0 || empty($category->description) )
    13471347            $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
Note: See TracChangeset for help on using the changeset viewer.