Skip to content

Instantly share code, notes, and snippets.

@kowata
Created June 6, 2014 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kowata/4232a51904817cfcb5cf to your computer and use it in GitHub Desktop.
Save kowata/4232a51904817cfcb5cf to your computer and use it in GitHub Desktop.
WP: pingbackの停止(?)
/* ==================================================
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' );
@wykydtronik
Copy link

Can also be a drop-in plugin ;) Forked with added lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment