Make WordPress Core

Changeset 34476


Ignore:
Timestamp:
09/24/2015 03:53:39 AM (9 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp.php

    r34443 r34476  
    599599            // Only set X-Pingback for single posts.
    600600            if ( is_singular() ) {
    601                 $p = get_queried_object();
     601                $p = clone $wp_query->post;
    602602                if ( $p && pings_open( $p ) ) {
    603603                    @header( 'X-Pingback: ' . get_bloginfo( 'pingback_url' ) );
Note: See TracChangeset for help on using the changeset viewer.