Skip to content

Commit d4c6827

Browse files
author
Marcel Moll
committed
Create disable_self_pingback.php
1 parent fc0f0da commit d4c6827

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

disable_self_pingbacks.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function disable_self_pingback( &$links ) {
2+
$home = get_option( 'home' );
3+
foreach ( $links as $l => $link )
4+
if ( 0 === strpos( $link, $home ) )
5+
unset($links[$l]);
6+
}
7+
add_action( 'pre_ping', 'disable_self_pingback' );

0 commit comments

Comments
 (0)