The logic for sending the `X-Pingback` header for single posts that allow pings was recently moved from `WP::handle_404()` to a more appropriate place in `WP::send_headers()`. To check whether pings are open for a particular post, that logic relies on the `$wp_query` global, which is declared in `WP::handle_404()`, but not in `WP::send_headers()` This commit ensures that `$wp_query` is globalized in `WP::send_headers()` too, so that the check works as expected. Follow-up to [54250]. Props strategio, sabernhardt, dlh, davidbaumwald, SergeyBiryukov. Fixes #56840. Built from https://develop.svn.wordpress.org/trunk@54636 git-svn-id: http://core.svn.wordpress.org/trunk@54188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
25 KiB
25 KiB