Skip to content

Instantly share code, notes, and snippets.

@un1ko85
Created May 2, 2013 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save un1ko85/5504548 to your computer and use it in GitHub Desktop.
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/
/* 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