Created
July 28, 2013 08:26
-
-
Save ovizii/6097937 to your computer and use it in GitHub Desktop.
Remove pings to self
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
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