No Self Pings - Version 0.1

Version Description

Download this release

Release Info

Developer mdawaffe
Plugin Icon 128x128 No Self Pings
Version 0.1
Comparing to
See all releases

Version 0.1

Files changed (1) hide show
  1. no-self-pings.php +21 -0
no-self-pings.php ADDED
@@ -0,0 +1,21 @@
1
+ <?php
2
+ /*
3
+ Plugin Name: No Self Pings
4
+ Plugin URI: http://blogwaffe.com/2006/10/04/421/
5
+ Description: Keeps WordPress from sending pings to your own site.
6
+ Version: 0.1
7
+ Author: Michael D. Adams
8
+ Author URI: http://blogwaffe.com/
9
+
10
+ License: GPL2 - http://www.gnu.org/licenses/gpl.txt
11
+ */
12
+
13
+ function no_self_ping( &$links, &$pung ) {
14
+ $home = get_option( 'home' );
15
+ foreach ( $links as $l => $link )
16
+ if ( 0 === strpos( $link, $home ) )
17
+ unset($links[$l]);
18
+ }
19
+
20
+ add_action( 'pre_ping', 'no_self_ping' );
21
+ ?>