WordPress Function to Remove pings to your own blog

Remove pings to your own blog

Tested on: WordPress 3.0.1

//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' );

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *