Ticket #4547: 4547.diff
File 4547.diff, 1.2 KB (added by , 16 years ago) |
---|
-
wp-includes/rss.php
9 9 * License: GPL 10 10 */ 11 11 12 if ( defined('SKIP_MAGPIE') ) { 13 12 14 define('RSS', 'RSS'); 13 15 define('ATOM', 'Atom'); 14 16 define('MAGPIE_USER_AGENT', 'WordPress/' . $wp_version); … … 825 827 function wp_rss( $url, $num_items = -1 ) { 826 828 if ( $rss = fetch_rss( $url ) ) { 827 829 echo '<ul>'; 828 830 829 831 if ( $num_items !== -1 ) { 830 832 $rss->items = array_slice( $rss->items, 0, $num_items ); 831 833 } 832 834 833 835 foreach ( $rss->items as $item ) { 834 836 printf( 835 '<li><a href="%1$s" title="%2$s">%3$s</a></li>', 836 clean_url( $item['link'] ), 837 attribute_escape( strip_tags( $item['description'] ) ), 837 '<li><a href="%1$s" title="%2$s">%3$s</a></li>', 838 clean_url( $item['link'] ), 839 attribute_escape( strip_tags( $item['description'] ) ), 838 840 htmlentities( $item['title'] ) 839 841 ); 840 842 } 841 843 842 844 echo '</ul>'; 843 845 } else { 844 846 _e( 'An error has occurred, which probably means the feed is down. Try again later.' ); … … 864 866 } 865 867 endif; 866 868 869 } 870 867 871 ?> 872 No newline at end of file