From 8272a839cde546b94d880f8fbf2e7f507d5530d9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 27 Sep 2015 18:28:24 +0000 Subject: [PATCH] Update the docs in `WP` to explain the need to do [34476]. Fixes #20226. Built from https://develop.svn.wordpress.org/trunk@34632 git-svn-id: http://core.svn.wordpress.org/trunk@34596 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp.php | 10 ++++++++-- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 47f97d4d4d..0a1af19f0b 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -359,10 +359,12 @@ class WP { /** * Send additional HTTP headers for caching, content type, etc. * - * Sets the X-Pingback header, 404 status (if 404), Content-type. If showing - * a feed, it will also send last-modified, etag, and 304 status if needed. + * Sets the Content-Type header. + * Sets the 'error' status (if passed) and optionally exits. + * If showing a feed, it will also send Last-Modified, ETag, and 304 status if needed. * * @since 2.0.0 + * @since 4.4.0 X-Pingback header is added conditionally after posts have been queried in handle_404(). */ public function send_headers() { $headers = array(); @@ -582,6 +584,10 @@ class WP { * * Otherwise, issue a 200. * + * This sets headers after posts have been queried. handle_404() really means "handle status." + * By inspecting the result of querying posts, seemingly successful requests can be switched to + * a 404 so that canonical redirection logic can kick in. + * * @since 2.0.0 * * @global WP_Query $wp_query diff --git a/wp-includes/version.php b/wp-includes/version.php index 6c964c89ca..c1367dacad 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34631'; +$wp_version = '4.4-alpha-34632'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.