WordPress.org

Make WordPress Core

Ticket #14971: classes.diff

File classes.diff, 746 bytes (added by niallkennedy, 11 years ago)

only set X-Pingback header if default_ping_status is open

  • wp-includes/classes.php

     
    316316         * @since 2.0.0
    317317         */
    318318        function send_headers() {
    319                 $headers = array('X-Pingback' => get_bloginfo('pingback_url'));
     319                $headers = array();
    320320                $status = null;
    321321                $exit_required = false;
    322322
    323323                if ( is_user_logged_in() )
    324324                        $headers = array_merge($headers, wp_get_nocache_headers());
     325                if ( get_option( 'default_ping_status' ) === 'open' )
     326                        $headers['X-Pingback'] = get_bloginfo('pingback_url');
    325327                if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
    326328                        $status = 404;
    327329                        if ( !is_user_logged_in() )