Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created September 2, 2014 10:48
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 braddalton/fa6fa492917fbcc4f6c7 to your computer and use it in GitHub Desktop.
Save braddalton/fa6fa492917fbcc4f6c7 to your computer and use it in GitHub Desktop.
function wpsites_disable_self_pingbacks( &$links ) {
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, get_option( 'home' ) ) )
unset($links[$l]);
}
add_action( 'pre_ping', 'wpsites_disable_self_pingbacks' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment