diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-12-07 10:17:25 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-12-07 10:17:25 +0000 |
commit | e7b243973132b555e66a0517e25232ba213bc35e (patch) | |
tree | ff9d04034493cc544d1064e56a1c8b8265d63b3f /wp-includes/classes.php | |
parent | f57c5009b529dcc2494fc719f605ef64b7f9b4c7 (diff) | |
download | wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.tar.gz wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.tar.xz wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.zip |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@819 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/classes.php')
-rw-r--r-- | wp-includes/classes.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/wp-includes/classes.php b/wp-includes/classes.php index f8bb896..fb3110a 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -575,13 +575,14 @@ class Walker_Category extends Walker { function start_el($output, $category, $depth, $args) { extract($args); - $link = '<a href="' . get_category_link($category->cat_ID) . '" '; + $cat_name = wp_specialchars( $category->cat_name, 1 ); + $link = '<a href="' . get_category_link( $category->cat_ID ) . '" '; if ( $use_desc_for_title == 0 || empty($category->category_description) ) - $link .= 'title="'. sprintf(__("View all posts filed under %s"), wp_specialchars($category->cat_name, 1)) . '"'; + $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"'; else - $link .= 'title="' . wp_specialchars(apply_filters('category_description',$category->category_description,$category),1) . '"'; + $link .= 'title="' . wp_specialchars( apply_filters( 'category_description', $category->category_description, $category ), 1 ) . '"'; $link .= '>'; - $link .= apply_filters('list_cats', $category->cat_name, $category).'</a>'; + $link .= apply_filters( 'list_cats', $category->cat_name, $category ).'</a>'; if ( (! empty($feed_image)) || (! empty($feed)) ) { $link .= ' '; @@ -589,9 +590,11 @@ class Walker_Category extends Walker { if ( empty($feed_image) ) $link .= '('; - $link .= '<a href="' . get_category_rss_link(0, $category->cat_ID, $category->category_nicename) . '"'; + $link .= '<a href="' . get_category_rss_link( 0, $category->cat_ID, $category->category_nicename ) . '"'; - if ( !empty($feed) ) { + if ( empty($feed) ) + $alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"'; + else { $title = ' title="' . $feed . '"'; $alt = ' alt="' . $feed . '"'; $name = $feed; @@ -600,17 +603,17 @@ class Walker_Category extends Walker { $link .= '>'; - if ( !empty($feed_image) ) - $link .= "<img src='$feed_image' $alt$title" . ' />'; - else + if ( empty($feed_image) ) $link .= $name; + else + $link .= "<img src='$feed_image'$alt$title" . ' />'; $link .= '</a>'; - if (empty($feed_image)) + if ( empty($feed_image) ) $link .= ')'; } if ( isset($show_count) && $show_count ) - $link .= ' ('.intval($category->category_count).')'; + $link .= ' (' . intval($category->category_count) . ')'; if ( isset($show_date) && $show_date ) { $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp); |