Ticket #17408: 17408.diff
| File 17408.diff, 2.3 KB (added by , 15 years ago) |
|---|
-
wp-includes/general-template.php
1643 1643 $post = &get_post( $id = 0 ); 1644 1644 1645 1645 if ( comments_open() || pings_open() || $post->comment_count > 0 ) { 1646 $title = esc_attr(sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], esc_html( get_the_title() ) ));1646 $title = sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], esc_html( get_the_title() ) ); 1647 1647 $href = get_post_comments_feed_link( $post->ID ); 1648 1648 } 1649 1649 } elseif ( is_category() ) { 1650 1650 $term = get_queried_object(); 1651 1651 1652 $title = esc_attr(sprintf( $args['cattitle'], get_bloginfo('name'), $args['separator'], $term->name ));1652 $title = sprintf( $args['cattitle'], get_bloginfo('name'), $args['separator'], $term->name ); 1653 1653 $href = get_category_feed_link( $term->term_id ); 1654 1654 } elseif ( is_tag() ) { 1655 1655 $term = get_queried_object(); 1656 1656 1657 $title = esc_attr(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name ));1657 $title = sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name ); 1658 1658 $href = get_tag_feed_link( $term->term_id ); 1659 1659 } elseif ( is_author() ) { 1660 1660 $author_id = intval( get_query_var('author') ); 1661 1661 1662 $title = esc_attr(sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta( 'display_name', $author_id ) ));1662 $title = sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta( 'display_name', $author_id ) ); 1663 1663 $href = get_author_feed_link( $author_id ); 1664 1664 } elseif ( is_search() ) { 1665 $title = esc_attr(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) ));1665 $title = sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) ); 1666 1666 $href = get_search_feed_link(); 1667 1667 } 1668 1668 1669 1669 if ( isset($title) && isset($href) ) 1670 echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . $title . '" href="' . $href. '" />' . "\n";1670 echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n"; 1671 1671 } 1672 1672 1673 1673 /**