Created
July 19, 2014 19:33
-
-
Save joshuadavidnelson/d5630e1103a7faa65b70 to your computer and use it in GitHub Desktop.
Disable pingbacks
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
<?php | |
/** | |
* Disable pingbacks | |
* | |
* Useful to secure your site from *potential* xmprpc DDoS attacks, but it does disable the pingback feature and could conflict with other plugins | |
* | |
* http://l.jdn.im/disable-pinkback | |
**/ | |
add_filter( 'xmlrpc_methods', function( $methods ) { | |
unset( $methods['pingback.ping'] ); | |
return $methods; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI, the DDoS hack was fixed in WordPress Version 3.6. See also this post