author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:52:52 +0200 | |
changeset 22 | 8c2e4d02f4ef |
parent 16 | a86126ab1dd4 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* RSS 1 RDF Feed Template for displaying RSS 1 Posts feed. |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
*/ |
|
7 |
||
9 | 8 |
header( 'Content-Type: ' . feed_content_type( 'rdf' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
0 | 9 |
$more = 1; |
10 |
||
9 | 11 |
echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; |
5 | 12 |
|
13 |
/** This action is documented in wp-includes/feed-rss2.php */ |
|
14 |
do_action( 'rss_tag_pre', 'rdf' ); |
|
15 |
?> |
|
0 | 16 |
<rdf:RDF |
17 |
xmlns="http://purl.org/rss/1.0/" |
|
18 |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|
19 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
20 |
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" |
|
21 |
xmlns:admin="http://webns.net/mvcb/" |
|
22 |
xmlns:content="http://purl.org/rss/1.0/modules/content/" |
|
23 |
<?php |
|
24 |
/** |
|
25 |
* Fires at the end of the feed root to add namespaces. |
|
26 |
* |
|
27 |
* @since 2.0.0 |
|
28 |
*/ |
|
29 |
do_action( 'rdf_ns' ); |
|
30 |
?> |
|
31 |
> |
|
9 | 32 |
<channel rdf:about="<?php bloginfo_rss( 'url' ); ?>"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
33 |
<title><?php wp_title_rss(); ?></title> |
9 | 34 |
<link><?php bloginfo_rss( 'url' ); ?></link> |
35 |
<description><?php bloginfo_rss( 'description' ); ?></description> |
|
36 |
<dc:date><?php echo get_feed_build_date( 'Y-m-d\TH:i:s\Z' ); ?> </dc:date> |
|
37 |
<sy:updatePeriod> |
|
38 |
<?php |
|
5 | 39 |
/** This filter is documented in wp-includes/feed-rss2.php */ |
40 |
echo apply_filters( 'rss_update_period', 'hourly' ); |
|
9 | 41 |
?> |
42 |
</sy:updatePeriod> |
|
43 |
<sy:updateFrequency> |
|
44 |
<?php |
|
5 | 45 |
/** This filter is documented in wp-includes/feed-rss2.php */ |
46 |
echo apply_filters( 'rss_update_frequency', '1' ); |
|
9 | 47 |
?> |
48 |
</sy:updateFrequency> |
|
0 | 49 |
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase> |
50 |
<?php |
|
51 |
/** |
|
52 |
* Fires at the end of the RDF feed header. |
|
53 |
* |
|
54 |
* @since 2.0.0 |
|
55 |
*/ |
|
56 |
do_action( 'rdf_header' ); |
|
57 |
?> |
|
58 |
<items> |
|
59 |
<rdf:Seq> |
|
9 | 60 |
<?php |
61 |
while ( have_posts() ) : |
|
62 |
the_post(); |
|
63 |
?> |
|
64 |
<rdf:li rdf:resource="<?php the_permalink_rss(); ?>"/> |
|
0 | 65 |
<?php endwhile; ?> |
66 |
</rdf:Seq> |
|
67 |
</items> |
|
68 |
</channel> |
|
9 | 69 |
<?php |
70 |
rewind_posts(); |
|
71 |
while ( have_posts() ) : |
|
72 |
the_post(); |
|
73 |
?> |
|
74 |
<item rdf:about="<?php the_permalink_rss(); ?>"> |
|
75 |
<title><?php the_title_rss(); ?></title> |
|
76 |
<link><?php the_permalink_rss(); ?></link> |
|
16 | 77 |
|
9 | 78 |
<dc:creator><![CDATA[<?php the_author(); ?>]]></dc:creator> |
16 | 79 |
<dc:date><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', $post->post_date_gmt, false ); ?></dc:date> |
9 | 80 |
<?php the_category_rss( 'rdf' ); ?> |
16 | 81 |
|
9 | 82 |
<?php if ( get_option( 'rss_use_excerpt' ) ) : ?> |
16 | 83 |
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description> |
84 |
<?php else : ?> |
|
85 |
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description> |
|
86 |
<content:encoded><![CDATA[<?php the_content_feed( 'rdf' ); ?>]]></content:encoded> |
|
87 |
<?php endif; ?> |
|
88 |
||
0 | 89 |
<?php |
90 |
/** |
|
91 |
* Fires at the end of each RDF feed item. |
|
92 |
* |
|
93 |
* @since 2.0.0 |
|
94 |
*/ |
|
95 |
do_action( 'rdf_item' ); |
|
96 |
?> |
|
97 |
</item> |
|
9 | 98 |
<?php endwhile; ?> |
0 | 99 |
</rdf:RDF> |