Changeset 42343 for trunk/src/wp-includes/feed-rss2.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/feed-rss2.php
r39614 r42343 6 6 */ 7 7 8 header( 'Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);8 header( 'Content-Type: ' . feed_content_type( 'rss2' ) . '; charset=' . get_option( 'blog_charset' ), true ); 9 9 $more = 1; 10 10 11 echo '<?xml version="1.0" encoding="' .get_option('blog_charset').'"?'.'>';11 echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; 12 12 13 13 /** … … 41 41 <title><?php wp_title_rss(); ?></title> 42 42 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 43 <link><?php bloginfo_rss('url') ?></link> 44 <description><?php bloginfo_rss("description") ?></description> 45 <lastBuildDate><?php 43 <link><?php bloginfo_rss( 'url' ); ?></link> 44 <description><?php bloginfo_rss( 'description' ); ?></description> 45 <lastBuildDate> 46 <?php 46 47 $date = get_lastpostmodified( 'GMT' ); 47 48 echo $date ? mysql2date( 'r', $date, false ) : date( 'r' ); 48 ?></lastBuildDate> 49 ?> 50 </lastBuildDate> 49 51 <language><?php bloginfo_rss( 'language' ); ?></language> 50 <sy:updatePeriod><?php 52 <sy:updatePeriod> 53 <?php 51 54 $duration = 'hourly'; 52 55 … … 60 63 */ 61 64 echo apply_filters( 'rss_update_period', $duration ); 62 ?></sy:updatePeriod> 63 <sy:updateFrequency><?php 65 ?> 66 </sy:updatePeriod> 67 <sy:updateFrequency> 68 <?php 64 69 $frequency = '1'; 65 70 … … 73 78 */ 74 79 echo apply_filters( 'rss_update_frequency', $frequency ); 75 ?></sy:updateFrequency> 80 ?> 81 </sy:updateFrequency> 76 82 <?php 77 83 /** … … 80 86 * @since 2.0.0 81 87 */ 82 do_action( 'rss2_head' );88 do_action( 'rss2_head' ); 83 89 84 while( have_posts()) : the_post(); 90 while ( have_posts() ) : 91 the_post(); 85 92 ?> 86 93 <item> 87 <title><?php the_title_rss() ?></title>88 <link><?php the_permalink_rss() ?></link>94 <title><?php the_title_rss(); ?></title> 95 <link><?php the_permalink_rss(); ?></link> 89 96 <?php if ( get_comments_number() || comments_open() ) : ?> 90 97 <comments><?php comments_link_feed(); ?></comments> 91 98 <?php endif; ?> 92 <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>93 <dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>94 <?php the_category_rss( 'rss2')?>99 <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate> 100 <dc:creator><![CDATA[<?php the_author(); ?>]]></dc:creator> 101 <?php the_category_rss( 'rss2' ); ?> 95 102 96 103 <guid isPermaLink="false"><?php the_guid(); ?></guid> 97 <?php if ( get_option('rss_use_excerpt')) : ?>104 <?php if ( get_option( 'rss_use_excerpt' ) ) : ?> 98 105 <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description> 99 106 <?php else : ?> 100 107 <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description> 101 <?php $content = get_the_content_feed( 'rss2'); ?>108 <?php $content = get_the_content_feed( 'rss2' ); ?> 102 109 <?php if ( strlen( $content ) > 0 ) : ?> 103 110 <content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded> … … 107 114 <?php endif; ?> 108 115 <?php if ( get_comments_number() || comments_open() ) : ?> 109 <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link( null, 'rss2') ); ?></wfw:commentRss>116 <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link( null, 'rss2' ) ); ?></wfw:commentRss> 110 117 <slash:comments><?php echo get_comments_number(); ?></slash:comments> 111 118 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.