Skip to content

Instantly share code, notes, and snippets.

@cdils
Forked from baczoni/gist:2481083
Last active December 30, 2015 00:39
Show Gist options
  • Select an option

  • Save cdils/7750903 to your computer and use it in GitHub Desktop.

Select an option

Save cdils/7750903 to your computer and use it in GitHub Desktop.

Revisions

  1. cdils renamed this gist Dec 2, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1 → disable-self-ping.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php //remove this line

    function disable_self_ping( &$links ) {
    foreach ( $links as $l => $link )
    if ( 0 === strpos( $link, get_option( 'home' ) ) )
  2. @baczoni baczoni created this gist Apr 24, 2012.
    6 changes: 6 additions & 0 deletions gistfile1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    function disable_self_ping( &$links ) {
    foreach ( $links as $l => $link )
    if ( 0 === strpos( $link, get_option( 'home' ) ) )
    unset($links[$l]);
    }
    add_action( 'pre_ping', 'disable_self_ping' );