diff --git a/wp-atom.php b/wp-atom.php
index 11db36506..60f215541 100644
--- a/wp-atom.php
+++ b/wp-atom.php
@@ -5,47 +5,6 @@ if (empty($wp)) {
wp('feed=atom');
}
-header('Content-type: application/atom+xml; charset=' . get_option('blog_charset'), true);
-$more = 1;
+require (ABSPATH . WPINC . '/feed-atom.php');
-?>
-'; ?>
-
- >
-
-
-
-
- WordPress
-
-
-
-
-
-
-
-
-
-
-
-
- ]]>
-
-
-
-
-
- ]]>
-
- ]]>
-
-
-
-
-
-
+?>
\ No newline at end of file
diff --git a/wp-commentsrss2.php b/wp-commentsrss2.php
index 92858b6a9..531f6268b 100644
--- a/wp-commentsrss2.php
+++ b/wp-commentsrss2.php
@@ -5,85 +5,6 @@ if (empty($wp)) {
wp('feed=rss2&withcomments=1');
}
-header('Content-type: text/xml;charset=' . get_option('blog_charset'), true);
+require (ABSPATH . WPINC . '/feed-rss2-comments.php');
-echo '';
-?>
-
-
-
-
-
-
-
-
- http://wordpress.org/?v=
-
-get_results("SELECT comment_ID, comment_author, comment_author_email,
- comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
- $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
- LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "'
- AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
- AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "'
- ORDER BY comment_date_gmt ASC" );
- } else { // if no post id passed in, we'll just ue the last 10 comments.
- $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
- comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
- $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
- LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish'
- AND $wpdb->comments.comment_approved = '1' AND post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'
- ORDER BY comment_date_gmt DESC LIMIT " . get_option('posts_per_rss') );
- }
- // this line is WordPress' motor, do not delete it.
- if ($comments) {
- foreach ($comments as $comment) {
- $GLOBALS['comment'] =& $comment;
- // Some plugins may need to know the metadata
- // associated with this comment's post:
- get_post_custom($comment->comment_post_ID);
-?>
- -
- comment_post_ID);
- $title = apply_filters('the_title', $title);
- $title = apply_filters('the_title_rss', $title);
- printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss());
- } else {
- printf(__('By: %s'), get_comment_author_rss());
- } ?>
-
-
-
-
- post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
- ?>
-
- ]]>
-
-
- ]]>
- comment_ID, $comment->comment_post_ID);
- ?>
-
-
-
-
+?>
\ No newline at end of file
diff --git a/wp-includes/feed-atom.php b/wp-includes/feed-atom.php
new file mode 100644
index 000000000..17fce725d
--- /dev/null
+++ b/wp-includes/feed-atom.php
@@ -0,0 +1,45 @@
+
+'; ?>
+
+ >
+
+
+
+
+ WordPress
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+ ]]>
+
+ ]]>
+
+
+
+
+
+
diff --git a/wp-includes/feed-rdf.php b/wp-includes/feed-rdf.php
new file mode 100644
index 000000000..80b1d6d0b
--- /dev/null
+++ b/wp-includes/feed-rdf.php
@@ -0,0 +1,51 @@
+
+'; ?>
+
+
+>
+">
+
+
+
+
+
+ hourly
+ 1
+ 2000-01-01T12:00+00:00
+
+
+
+
+
+
+
+
+
+
+-
+
+
+ post_date_gmt, false); ?>
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
diff --git a/wp-includes/feed-rss.php b/wp-includes/feed-rss.php
new file mode 100644
index 000000000..97e06105c
--- /dev/null
+++ b/wp-includes/feed-rss.php
@@ -0,0 +1,31 @@
+
+'; ?>
+
+
+
+
+
+
+
+ http://backend.userland.com/rss092
+
+
+
+
+ -
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
diff --git a/wp-includes/feed-rss2-comments.php b/wp-includes/feed-rss2-comments.php
new file mode 100644
index 000000000..4e4989849
--- /dev/null
+++ b/wp-includes/feed-rss2-comments.php
@@ -0,0 +1,83 @@
+';
+?>
+
+
+
+
+
+
+
+
+ http://wordpress.org/?v=
+
+get_results("SELECT comment_ID, comment_author, comment_author_email,
+ comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
+ $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
+ LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "'
+ AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
+ AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "'
+ ORDER BY comment_date_gmt ASC" );
+ } else { // if no post id passed in, we'll just ue the last 10 comments.
+ $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
+ comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
+ $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
+ LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish'
+ AND $wpdb->comments.comment_approved = '1' AND post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'
+ ORDER BY comment_date_gmt DESC LIMIT " . get_option('posts_per_rss') );
+ }
+ // this line is WordPress' motor, do not delete it.
+ if ($comments) {
+ foreach ($comments as $comment) {
+ $GLOBALS['comment'] =& $comment;
+ // Some plugins may need to know the metadata
+ // associated with this comment's post:
+ get_post_custom($comment->comment_post_ID);
+?>
+ -
+ comment_post_ID);
+ $title = apply_filters('the_title', $title);
+ $title = apply_filters('the_title_rss', $title);
+ printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss());
+ } else {
+ printf(__('By: %s'), get_comment_author_rss());
+ } ?>
+
+
+
+
+ post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
+ ?>
+
+ ]]>
+
+
+ ]]>
+ comment_ID, $comment->comment_post_ID);
+ ?>
+
+
+
+
diff --git a/wp-includes/feed-rss2.php b/wp-includes/feed-rss2.php
new file mode 100644
index 000000000..03711df84
--- /dev/null
+++ b/wp-includes/feed-rss2.php
@@ -0,0 +1,50 @@
+
+'; ?>
+
+
+
+>
+
+
+
+
+
+
+ http://wordpress.org/?v=
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ ]]>
+
+ ]]>
+ post_content ) > 0 ) : ?>
+ ]]>
+
+ ]]>
+
+
+
+
+
+
+
+
+
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 644e45e1f..7ee2c48e5 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -958,23 +958,23 @@ function do_feed() {
}
function do_feed_rdf() {
- load_template(ABSPATH . 'wp-rdf.php');
+ load_template(ABSPATH . WPINC . '/feed-rdf.php');
}
function do_feed_rss() {
- load_template(ABSPATH . 'wp-rss.php');
+ load_template(ABSPATH . WPINC . '/feed-rss.php');
}
function do_feed_rss2($for_comments) {
if ( $for_comments ) {
- load_template(ABSPATH . 'wp-commentsrss2.php');
+ load_template(ABSPATH . WPINC . '/feed-rss2-comments.php');
} else {
- load_template(ABSPATH . 'wp-rss2.php');
+ load_template(ABSPATH . WPINC . '/feed-rss2.php');
}
}
function do_feed_atom() {
- load_template(ABSPATH . 'wp-atom.php');
+ load_template(ABSPATH . WPINC . '/feed-atom.php');
}
function do_robots() {
diff --git a/wp-rdf.php b/wp-rdf.php
index f64709e72..293032b44 100644
--- a/wp-rdf.php
+++ b/wp-rdf.php
@@ -5,53 +5,6 @@ if (empty($wp)) {
wp('feed=rdf');
}
-header('Content-type: application/rdf+xml; charset=' . get_option('blog_charset'), true);
-$more = 1;
+require (ABSPATH . WPINC . '/feed-rdf.php');
-?>
-'; ?>
-
-
->
-">
-
-
-
-
-
- hourly
- 1
- 2000-01-01T12:00+00:00
-
-
-
-
-
-
-
-
-
-
--
-
-
- post_date_gmt, false); ?>
-
-
-
-
-
-
- ]]>
-
-
-
-
-
+?>
\ No newline at end of file
diff --git a/wp-rss.php b/wp-rss.php
index c10b065f0..9df542773 100644
--- a/wp-rss.php
+++ b/wp-rss.php
@@ -5,33 +5,6 @@ if (empty($wp)) {
wp('feed=rss');
}
-header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
-$more = 1;
+require (ABSPATH . WPINC . '/feed-rss.php');
-?>
-'; ?>
-
-
-
-
-
-
-
- http://backend.userland.com/rss092
-
-
-
-
- -
-
-
- ]]>
-
-
-
-
-
-
-
-
-
+?>
\ No newline at end of file
diff --git a/wp-rss2.php b/wp-rss2.php
index 4addfc4bc..6467ab8e9 100644
--- a/wp-rss2.php
+++ b/wp-rss2.php
@@ -5,52 +5,6 @@ if (empty($wp)) {
wp('feed=rss2');
}
-header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
-$more = 1;
+require (ABSPATH . WPINC . '/feed-rss2.php');
-?>
-'; ?>
-
-
-
->
-
-
-
-
-
-
- http://wordpress.org/?v=
-
-
-
- -
-
-
-
-
-
-
-
-
-
- ]]>
-
- ]]>
- post_content ) > 0 ) : ?>
- ]]>
-
- ]]>
-
-
-
-
-
-
-
-
-
+?>
\ No newline at end of file