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