summaryrefslogtreecommitdiffstats
path: root/wp-includes/functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-23 15:47:59 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-23 15:47:59 +0000
commit132f53ddaeb250222a4ac85ebc0bf4dd780db60e (patch)
treed3deccaeee2dd2460dc36fef83685262ef0b64fc /wp-includes/functions.php
parent5235dfe56983b253c4ea3ec91bc436e5ffb2660a (diff)
downloadwordpress-mu-132f53ddaeb250222a4ac85ebc0bf4dd780db60e.tar.gz
wordpress-mu-132f53ddaeb250222a4ac85ebc0bf4dd780db60e.tar.xz
wordpress-mu-132f53ddaeb250222a4ac85ebc0bf4dd780db60e.zip
WP Merge to 4929
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@899 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/functions.php')
-rw-r--r--wp-includes/functions.php37
1 files changed, 24 insertions, 13 deletions
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index aaaefc1..ca65479 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -318,7 +318,7 @@ function update_option($option_name, $newvalue) {
// If the new and old values are the same, no need to update.
$oldvalue = get_option($option_name);
- if ( $newvalue == $oldvalue ) {
+ if ( $newvalue === $oldvalue ) {
return false;
}
@@ -961,37 +961,48 @@ function do_feed() {
// Remove the pad, if present.
$feed = preg_replace('/^_+/', '', $feed);
- if ($feed == '' || $feed == 'feed')
+ if ( $feed == '' || $feed == 'feed' )
$feed = 'rss2';
-
+
$for_comments = false;
- if ( 1 != get_query_var('withoutcomments') && ( is_singular() || get_query_var('withcomments') == 1 || $feed == 'comments-rss2' ) ) {
- $feed = 'rss2';
- $for_comments = true;
- }
+
+ if ( is_singular() || get_query_var('withcomments') == 1 )
+ $for_comments = true;
+
+ if ( false !== strpos($feed, 'comments-') ) {
+ $for_comments = true;
+ $feed = str_replace('comments-', '', $feed);
+ }
+
+ if ( get_query_var('withoutcomments') == 1 )
+ $for_comments = false;
$hook = 'do_feed_' . $feed;
do_action($hook, $for_comments);
}
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');
+function do_feed_atom($for_comments) {
+ if ($for_comments) {
+ load_template(ABSPATH . WPINC . '/feed-atom-comments.php');
+ } else {
+ load_template(ABSPATH . WPINC . '/feed-atom.php');
+ }
}
function do_robots() {