Changeset 4579

Show
Ignore:
Timestamp:
12/01/06 18:28:43 (2 years ago)
Author:
ryan
Message:

Fix category feed_img markup. Props mdawaffe. fixes #1207

Files:

Legend:

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

    r4576 r4579  
    576576        extract($args); 
    577577 
    578         $link = '<a href="' . get_category_link($category->cat_ID) . '" '; 
     578        $cat_name = wp_specialchars( $category->cat_name, 1 ); 
     579        $link = '<a href="' . get_category_link( $category->cat_ID ) . '" '; 
    579580        if ( $use_desc_for_title == 0 || empty($category->category_description) ) 
    580             $link .= 'title="'. sprintf(__("View all posts filed under %s"), wp_specialchars($category->cat_name, 1)) . '"'; 
     581            $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"'; 
    581582        else 
    582             $link .= 'title="' . wp_specialchars(apply_filters('category_description',$category->category_description,$category),1) . '"'; 
     583            $link .= 'title="' . wp_specialchars( apply_filters( 'category_description', $category->category_description, $category ), 1 ) . '"'; 
    583584        $link .= '>'; 
    584         $link .= apply_filters('list_cats', $category->cat_name, $category).'</a>'; 
     585        $link .= apply_filters( 'list_cats', $category->cat_name, $category ).'</a>'; 
    585586 
    586587        if ( (! empty($feed_image)) || (! empty($feed)) ) { 
     
    590591                $link .= '('; 
    591592 
    592             $link .= '<a href="' . get_category_rss_link(0, $category->cat_ID, $category->category_nicename) . '"'; 
    593  
    594             if ( !empty($feed) ) { 
     593            $link .= '<a href="' . get_category_rss_link( 0, $category->cat_ID, $category->category_nicename ) . '"'; 
     594 
     595            if ( emtpy($feed) ) 
     596                $alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"'; 
     597            else { 
    595598                $title = ' title="' . $feed . '"'; 
    596599                $alt = ' alt="' . $feed . '"'; 
     
    601604            $link .= '>'; 
    602605 
    603             if ( !empty($feed_image) ) 
    604                 $link .= "<img src='$feed_image' $alt$title" . ' />'
     606            if ( empty($feed_image) ) 
     607                $link .= $name
    605608            else 
    606                 $link .= $name
     609                $link .= "<img src='$feed_image'$alt$title" . ' />'
    607610            $link .= '</a>'; 
    608             if (empty($feed_image)
     611            if ( empty($feed_image)
    609612                $link .= ')'; 
    610613        } 
    611614     
    612615        if ( isset($show_count) && $show_count ) 
    613             $link .= ' ('.intval($category->category_count).')'; 
     616            $link .= ' (' . intval($category->category_count) . ')'; 
    614617     
    615618        if ( isset($show_date) && $show_date ) {