author | Anthony Ly <anthonyly.com@gmail.com> |
Mon, 19 Nov 2012 18:26:13 +0100 | |
changeset 194 | 32102edaa81b |
parent 136 | bde1974c263b |
child 204 | 09a1c134465b |
permissions | -rw-r--r-- |
136 | 1 |
<?php |
2 |
/** |
|
3 |
* RSS2 Feed Template for displaying RSS2 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 |
||
13 |
<rss version="2.0" |
|
14 |
xmlns:content="http://purl.org/rss/1.0/modules/content/" |
|
15 |
xmlns:wfw="http://wellformedweb.org/CommentAPI/" |
|
16 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
17 |
xmlns:atom="http://www.w3.org/2005/Atom" |
|
18 |
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" |
|
19 |
xmlns:slash="http://purl.org/rss/1.0/modules/slash/" |
|
20 |
<?php do_action('rss2_ns'); ?> |
|
21 |
> |
|
22 |
||
23 |
<channel> |
|
24 |
<title><?php bloginfo_rss('name'); wp_title_rss(); ?></title> |
|
25 |
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> |
|
26 |
<link><?php bloginfo_rss('url') ?></link> |
|
27 |
<description><?php bloginfo_rss("description") ?></description> |
|
28 |
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
29 |
<language><?php bloginfo_rss( 'language' ); ?></language> |
136 | 30 |
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod> |
31 |
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency> |
|
32 |
<?php do_action('rss2_head'); ?> |
|
33 |
<?php while( have_posts()) : the_post(); ?> |
|
34 |
<item> |
|
35 |
<title><?php the_title_rss() ?></title> |
|
36 |
<link><?php the_permalink_rss() ?></link> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
37 |
<comments><?php comments_link_feed(); ?></comments> |
136 | 38 |
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate> |
39 |
<dc:creator><?php the_author() ?></dc:creator> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
40 |
<?php the_category_rss('rss2') ?> |
136 | 41 |
|
42 |
<guid isPermaLink="false"><?php the_guid(); ?></guid> |
|
43 |
<?php if (get_option('rss_use_excerpt')) : ?> |
|
44 |
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description> |
|
45 |
<?php else : ?> |
|
46 |
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description> |
|
47 |
<?php if ( strlen( $post->post_content ) > 0 ) : ?> |
|
48 |
<content:encoded><![CDATA[<?php the_content_feed('rss2') ?>]]></content:encoded> |
|
49 |
<?php else : ?> |
|
50 |
<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded> |
|
51 |
<?php endif; ?> |
|
52 |
<?php endif; ?> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
53 |
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss> |
136 | 54 |
<slash:comments><?php echo get_comments_number(); ?></slash:comments> |
55 |
<?php rss_enclosure(); ?> |
|
56 |
<?php do_action('rss2_item'); ?> |
|
57 |
</item> |
|
58 |
<?php endwhile; ?> |
|
59 |
</channel> |
|
60 |
</rss> |