Created
June 6, 2014 02:40
-
-
Save kowata/4232a51904817cfcb5cf to your computer and use it in GitHub Desktop.
WP: pingbackの停止(?)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ================================================== | |
pingbackの停止 | |
================================================== */ | |
function remove_x_pingback($headers) { | |
unset( $headers['X-Pingback'] ); | |
return $headers; | |
} | |
add_filter( 'wp_headers', 'remove_x_pingback' ); | |
function remove_pingback_method( $methods ) { | |
unset( $methods['pingback.ping'] ); | |
unset( $methods['pingback.extensions.getPingbacks'] ); | |
return $methods; | |
} | |
add_filter( 'xmlrpc_methods', 'remove_pingback_method' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can also be a drop-in plugin ;) Forked with added lines.