| 1 |
<?php |
| 2 |
header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
| 3 |
printf( '<?xml version="1.0" encoding="%s"?>', esc_attr( get_option( 'blog_charset' ) ) ); |
| 4 |
?> |
| 5 |
|
| 6 |
<rss version="2.0" |
| 7 |
xmlns:content="http://purl.org/rss/1.0/modules/content/" |
| 8 |
xmlns:wfw="http://wellformedweb.org/CommentAPI/" |
| 9 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
| 10 |
xmlns:atom="http://www.w3.org/2005/Atom" |
| 11 |
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" |
| 12 |
xmlns:slash="http://purl.org/rss/1.0/modules/slash/" |
| 13 |
<?php |
| 14 |
/** |
| 15 |
* Action fires during RSS xmls printing |
| 16 |
*/ |
| 17 |
do_action( 'rss2_ns' ) |
| 18 |
?> |
| 19 |
> |
| 20 |
<channel> |
| 21 |
<title><?php bloginfo_rss( 'name' ); ?> - <?php esc_html_e( 'Stream Feed', 'stream' ); ?></title> |
| 22 |
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> |
| 23 |
<link><?php echo esc_url( $records_admin_url ); ?></link> |
| 24 |
<description><?php bloginfo_rss( 'description' ); ?></description> |
| 25 |
<lastBuildDate><?php echo esc_html( mysql2date( 'r', $latest_record, false ) ); ?></lastBuildDate> |
| 26 |
<language><?php bloginfo_rss( 'language' ); ?></language> |
| 27 |
<sy:updatePeriod><?php echo esc_html( 'hourly' ); ?></sy:updatePeriod> |
| 28 |
<sy:updateFrequency><?php echo absint( 1 ); ?></sy:updateFrequency> |
| 29 |
<?php |
| 30 |
/** |
| 31 |
* Action fires during RSS head |
| 32 |
*/ |
| 33 |
do_action( 'rss2_head' ); |
| 34 |
|
| 35 |
foreach ( $records as $record ) : |
| 36 |
$record_link = add_query_arg( |
| 37 |
array( |
| 38 |
'record__in' => $record->ID, |
| 39 |
), |
| 40 |
$records_admin_url |
| 41 |
); |
| 42 |
|
| 43 |
$author = get_userdata( $record->author ); |
| 44 |
$display_name = isset( $author->display_name ) ? $author->display_name : 'N/A'; |
| 45 |
?> |
| 46 |
<item> |
| 47 |
<title><![CDATA[ <?php echo esc_html( $record->summary ); // xss ok ?> ]]></title> |
| 48 |
<pubDate><?php echo esc_html( mysql2date( 'r', $record->created, false ) ); ?></pubDate> |
| 49 |
<dc:creator><?php echo esc_html( $display_name ); ?></dc:creator> |
| 50 |
<category domain="connector"><![CDATA[ <?php echo esc_html( $record->connector ); ?> ]]></category> |
| 51 |
<category domain="context"><![CDATA[ <?php echo esc_html( $record->context ); ?> ]]></category> |
| 52 |
<category domain="action"><![CDATA[ <?php echo esc_html( $record->action ); ?> ]]></category> |
| 53 |
<category domain="ip"><?php echo esc_html( $record->ip ); ?></category> |
| 54 |
<guid isPermaLink="false"><?php echo esc_url( $record_link ); ?></guid> |
| 55 |
<link><?php echo esc_url( $record_link ); ?></link> |
| 56 |
<?php |
| 57 |
/** |
| 58 |
* Action fires during RSS item |
| 59 |
*/ |
| 60 |
do_action( 'rss2_item' ) |
| 61 |
?> |
| 62 |
</item> |
| 63 |
<?php endforeach; ?> |
| 64 |
</channel> |
| 65 |
</rss> |
| 66 |
|