Skip to content

Commit 075992b

Browse files
author
Dale Nguyen
authored
Merge pull request #6 from mo2l/disable_self_pingbacks
Create disable_self_pingback.php
2 parents fc0f0da + d4c6827 commit 075992b

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)