Created
May 2, 2013 19:05
-
-
Save un1ko85/5504548 to your computer and use it in GitHub Desktop.
How to disable self pings in WordPress
http://thesistut.com/2012/disable-self-pings-wordpress/
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
/* REMOVE SELF PINGING */ | |
function remove_self_pinging(&$links,&$pung) { | |
$self = get_option('siteurl'); | |
foreach ($links as $link => $data) { | |
if (false !== strpos($link,$self)) | |
unset($links[$link]); | |
} | |
} | |
add_action('pre_ping','remove_self_pinging',0,2); | |
/* END REMOVE SELF PINGING */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment