~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-includes/feed-rss.php

  • Committer: Jacek Nykis
  • Date: 2015-01-05 16:17:05 UTC
  • Revision ID: jacek.nykis@canonical.com-20150105161705-w544l1h5mcg7u4w9
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * RSS 0.92 Feed Template for displaying RSS 0.92 Posts feed.
 
4
 *
 
5
 * @package WordPress
 
6
 */
 
7
 
 
8
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
 
9
$more = 1;
 
10
 
 
11
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
 
12
<rss version="0.92">
 
13
<channel>
 
14
        <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
 
15
        <link><?php bloginfo_rss('url') ?></link>
 
16
        <description><?php bloginfo_rss('description') ?></description>
 
17
        <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
 
18
        <docs>http://backend.userland.com/rss092</docs>
 
19
        <language><?php bloginfo_rss( 'language' ); ?></language>
 
20
 
 
21
        <?php
 
22
        /**
 
23
         * Fires at the end of the RSS Feed Header.
 
24
         *
 
25
         * @since 2.0.0
 
26
         */
 
27
        do_action( 'rss_head' );
 
28
        ?>
 
29
 
 
30
<?php while (have_posts()) : the_post(); ?>
 
31
        <item>
 
32
                <title><?php the_title_rss() ?></title>
 
33
                <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
 
34
                <link><?php the_permalink_rss() ?></link>
 
35
                <?php
 
36
                /**
 
37
                 * Fires at the end of each RSS feed item.
 
38
                 *
 
39
                 * @since 2.0.0
 
40
                 */
 
41
                do_action( 'rss_item' );
 
42
                ?>
 
43
        </item>
 
44
<?php endwhile; ?>
 
45
</channel>
 
46
</rss>