From 7a154ca66615255e5d4b6b44f6d1f4634f077bc0 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 24 Sep 2015 03:54:24 +0000 Subject: [PATCH] WP: after [34443], calling `get_queried_object()` messes up unit tests. We can just clone the `$post` prop and call it a day. Fixes #20226. Built from https://develop.svn.wordpress.org/trunk@34476 git-svn-id: http://core.svn.wordpress.org/trunk@34440 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 625dd8bdd2..60eb6aff83 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -598,7 +598,7 @@ class WP { // Only set X-Pingback for single posts. if ( is_singular() ) { - $p = get_queried_object(); + $p = clone $wp_query->post; if ( $p && pings_open( $p ) ) { @header( 'X-Pingback: ' . get_bloginfo( 'pingback_url' ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 489f7b160f..0a98bdfc35 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34475'; +$wp_version = '4.4-alpha-34476'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.