Skip to content

Instantly share code, notes, and snippets.

@ovizii
Created July 28, 2013 08:26
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 ovizii/6097937 to your computer and use it in GitHub Desktop.
Save ovizii/6097937 to your computer and use it in GitHub Desktop.
Remove pings to self
function no_self_ping( &$links ) {
$home = get_option( 'home' );
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, $home ) )
unset($links[$l]);
}
add_action( 'pre_ping', 'no_self_ping' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment