| 1 |
<?php |
| 2 |
|
| 3 |
class Red_Rss_File extends Red_FileIO { |
| 4 |
function export( array $items ) { |
| 5 |
header( 'Content-type: text/xml; charset='.get_option( 'blog_charset' ), true ); |
| 6 |
echo '<?xml version="1.0" encoding="'.get_option( 'blog_charset' ).'"?'.">\r\n"; |
| 7 |
?> |
| 8 |
<rss version="2.0" |
| 9 |
xmlns:content="http://purl.org/rss/1.0/modules/content/" |
| 10 |
xmlns:wfw="http://wellformedweb.org/CommentAPI/" |
| 11 |
xmlns:dc="http://purl.org/dc/elements/1.1/"> |
| 12 |
<channel> |
| 13 |
<title>Redirection <?php ' - '; bloginfo_rss( 'name' ); ?></title> |
| 14 |
<link><?php esc_url( bloginfo_rss( 'url' ) ) ?></link> |
| 15 |
<description><?php esc_html( bloginfo_rss( 'description' ) ) ?></description> |
| 16 |
<pubDate><?php echo esc_html( mysql2date( 'D, d M Y H:i:s +0000', get_lastpostmodified( 'GMT' ), false ) ); ?></pubDate> |
| 17 |
<generator><?php echo esc_html( 'http://wordpress.org/?v=' ); bloginfo_rss( 'version' ); ?></generator> |
| 18 |
<language><?php echo esc_html( get_option( 'rss_language' ) ); ?></language> |
| 19 |
<?php |
| 20 |
foreach ( (array)$items as $log ) : ?> |
| 21 |
<item> |
| 22 |
<title><?php echo esc_html( $log->get_url() ); ?></title> |
| 23 |
<link><![CDATA[<?php echo esc_url( home_url() ); echo esc_url( $log->get_url() ); ?>]]></link> |
| 24 |
<pubDate><?php echo date( 'D, d M Y H:i:s +0000', $log->get_last_hit() ); ?></pubDate> |
| 25 |
<guid isPermaLink="false"><?php echo esc_html( $log->get_id() ); ?></guid> |
| 26 |
<description><?php echo esc_html( $log->get_url() ); ?></description> |
| 27 |
</item> |
| 28 |
<?php endforeach; ?> |
| 29 |
</channel> |
| 30 |
</rss> |
| 31 |
<?php |
| 32 |
} |
| 33 |
|
| 34 |
function load( $group, $data, $filename = '' ) { |
| 35 |
} |
| 36 |
} |
| 37 |
|