X-Pingback header set when no pingbacks accepted
|Reported by:||niallkennedy||Owned by:|
The send_headers function in wp-includes/classes.php sets the X-Pingback header when initializing the headers array. It's possible the site has disabled link notifications from other blogs (pingbacks and trackbacks) through the default_ping_status option exposed in Discussion Settings.
WordPress should only advertise the header when a given site has enabled pingbacks. Requires moving X-Pingback out of the initial headers variable and into a conditional.
The default_ping_status option sets a default that may be overridden in each post. The attached patch only addresses the site-wide option but does not take into consideration a request for a post or page which may enable a pingback regardless of the site-wide default.