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