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

git-svn-id: http://svn.automattic.com/wordpress/trunk@15586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith
2010-09-07 04:29:00 +00:00
parent 722fde708c
commit 48ca617449
2 changed files with 7 additions and 5 deletions

View File

@@ -1340,9 +1340,9 @@ class Walker_Category extends Walker {
function start_el(&$output, $category, $depth, $args) {
extract($args);
$cat_name = esc_attr( $category->name);
$cat_name = esc_attr( $category->name );
$cat_name = apply_filters( 'list_cats', $cat_name, $category );
$link = '<a href="' . get_term_link( $category, $category->taxonomy ) . '" ';
$link = '<a href="' . esc_attr( get_term_link($category) ) . '" ';
if ( $use_desc_for_title == 0 || empty($category->description) )
$link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
else