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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34476 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-24 03:53:39 +00:00
parent 6ad1c1c380
commit b9ad7136d7

View File

@@ -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' ) );
}