Ticket #14363: 14363.patch
File 14363.patch, 7.0 KB (added by , 14 years ago) |
---|
-
wp-includes/feed-atom.php
21 21 22 22 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated> 23 23 24 <link rel="alternate" type="text/html"href="<?php bloginfo_rss('url') ?>" />25 <id><?php bloginfo ('atom_url'); ?></id>24 <link rel="alternate" href="<?php bloginfo_rss('url') ?>" /> 25 <id><?php bloginfo_rss('atom_url'); ?></id> 26 26 <link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" /> 27 27 28 28 <?php do_action('atom_head'); ?> … … 35 35 <?php endif; 36 36 do_action('atom_author'); ?> 37 37 </author> 38 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>39 <link rel="alternate" type="text/html"href="<?php the_permalink_rss() ?>" />38 <title><?php the_title_rss() ?></title> 39 <link rel="alternate" href="<?php the_permalink_rss() ?>" /> 40 40 <id><?php the_guid() ; ?></id> 41 41 <updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated> 42 42 <published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published> 43 43 <?php the_category_rss('atom') ?> 44 <summary type="<?php html_type_rss(); ?>">< ![CDATA[<?php the_excerpt_rss(); ?>]]></summary>44 <summary type="<?php html_type_rss(); ?>"><?php the_excerpt_feed('atom'); ?></summary> 45 45 <?php if ( !get_option('rss_use_excerpt') ) : ?> 46 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>">< ![CDATA[<?php the_content_feed('atom') ?>]]></content>46 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>"><?php the_content_feed('atom'); ?></content> 47 47 <?php endif; ?> 48 48 <?php atom_enclosure(); ?> 49 49 <?php do_action('atom_entry'); ?> 50 <link rel="replies" type="text/html"href="<?php the_permalink_rss() ?>#comments" thr:count="<?php echo get_comments_number()?>"/>50 <link rel="replies" href="<?php the_permalink_rss() ?>#comments" thr:count="<?php echo get_comments_number()?>"/> 51 51 <link rel="replies" type="application/atom+xml" href="<?php echo get_post_comments_feed_link(0,'atom') ?>" thr:count="<?php echo get_comments_number()?>"/> 52 52 <thr:total><?php echo get_comments_number()?></thr:total> 53 53 </entry> -
wp-includes/feed.php
145 145 $feed_type = get_default_feed(); 146 146 147 147 $content = apply_filters('the_content', get_the_content()); 148 $content = str_replace(']]>', ']]>', $content); 148 if ($feed_type == 'atom') { 149 if (strpos(get_bloginfo('html_type'), 'xhtml') !== false) { 150 $content = '<div xmlns="http://www.w3.org/1999/xhtml">' . $content . '</div>'; 151 } 152 else { 153 $content = '<![CDATA[' . $content . ']]>'; 154 } 155 } 149 156 return apply_filters('the_content_feed', $content, $feed_type); 150 157 } 151 158 … … 165 172 } 166 173 167 174 /** 168 * Display the post excerpt for the feed .175 * Display the post excerpt for the feeds. 169 176 * 170 177 * @package WordPress 171 178 * @subpackage Feed 172 * @since 0.71179 * @since 3.2.0 173 180 * @uses apply_filters() Calls 'the_excerpt_rss' hook on the excerpt. 181 * @uses apply_filters() Calls 'the_excerpt_feed' hook on the excerpt. 182 * 183 * @param string $feed_type The type of feed. rss2 | atom | rss | rdf 174 184 */ 175 function the_excerpt_rss() { 176 $output = get_the_excerpt(); 177 echo apply_filters('the_excerpt_rss', $output); 185 function the_excerpt_feed($feed_type = null) { 186 if ( !$feed_type ) 187 $feed_type = get_default_feed(); 188 189 $output = apply_filters('the_excerpt_rss', get_the_excerpt()); 190 if ($feed_type == 'atom') { 191 if (strpos(get_bloginfo('html_type'), 'xhtml') !== false) { 192 $output = '<div xmlns="http://www.w3.org/1999/xhtml">' . $output . '</div>'; 193 } 194 else { 195 $output = '<![CDATA[' . $output . ']]>'; 196 } 197 } 198 echo apply_filters('the_excerpt_feed', $output, $feed_type); 178 199 } 179 200 180 201 /** -
wp-includes/feed-rss2.php
41 41 42 42 <guid isPermaLink="false"><?php the_guid(); ?></guid> 43 43 <?php if (get_option('rss_use_excerpt')) : ?> 44 <description><![CDATA[<?php the_excerpt_ rss() ?>]]></description>44 <description><![CDATA[<?php the_excerpt_feed('rss2') ?>]]></description> 45 45 <?php else : ?> 46 <description><![CDATA[<?php the_excerpt_ rss() ?>]]></description>46 <description><![CDATA[<?php the_excerpt_feed('rss2') ?>]]></description> 47 47 <?php if ( strlen( $post->post_content ) > 0 ) : ?> 48 48 <content:encoded><![CDATA[<?php the_content_feed('rss2') ?>]]></content:encoded> 49 49 <?php else : ?> 50 <content:encoded><![CDATA[<?php the_excerpt_ rss() ?>]]></content:encoded>50 <content:encoded><![CDATA[<?php the_excerpt_feed('rss2') ?>]]></content:encoded> 51 51 <?php endif; ?> 52 52 <?php endif; ?> 53 53 <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss> -
wp-includes/feed-rdf.php
43 43 <dc:creator><?php the_author() ?></dc:creator> 44 44 <?php the_category_rss('rdf') ?> 45 45 <?php if (get_option('rss_use_excerpt')) : ?> 46 <description><?php the_excerpt_ rss() ?></description>46 <description><?php the_excerpt_feed('rdf') ?></description> 47 47 <?php else : ?> 48 <description><?php the_excerpt_ rss() ?></description>48 <description><?php the_excerpt_feed('rdf') ?></description> 49 49 <content:encoded><![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded> 50 50 <?php endif; ?> 51 51 <?php do_action('rdf_item'); ?> -
wp-includes/feed-rss.php
22 22 <?php while (have_posts()) : the_post(); ?> 23 23 <item> 24 24 <title><?php the_title_rss() ?></title> 25 <description><![CDATA[<?php the_excerpt_ rss() ?>]]></description>25 <description><![CDATA[<?php the_excerpt_feed('rss') ?>]]></description> 26 26 <link><?php the_permalink_rss() ?></link> 27 27 <?php do_action('rss_item'); ?> 28 28 </item> -
wp-includes/deprecated.php
2585 2585 } 2586 2586 2587 2587 /** 2588 * Display the post excerpt for the feed. 2589 * 2590 * @package WordPress 2591 * @subpackage Feed 2592 * @since 0.71 2593 * @deprecated 3.2.0 2594 * @deprecated Use the_excerpt_feed() 2595 * @see the_excerpt_feed() 2596 */ 2597 function the_excerpt_rss() { 2598 _deprecated_function( __FUNCTION__, '3.2', 'the_excerpt_feed' ); 2599 the_excerpt_feed('rss'); 2600 } 2601 2602 /** 2588 2603 * Update the categories cache. 2589 2604 * 2590 2605 * This function does not appear to be used anymore or does not appear to be