Home
/
Disable Self Pingbacks
Duplicate Snippet
Embed Snippet on Your Site
Disable Self Pingbacks
Prevent WordPress from automatically creating pingbacks from your own site.
php | |
| <?php
|
| add_action( 'pre_ping', function( &$links ) {
|
| $home = get_option( 'home' );
|
| foreach ( $links as $l => $link ) {
|
| if ( 0 === strpos( $link, $home ) ) {
|
| unset( $links[ $l ] );
|
| }
|
| }
|
| } );
|
|
|
| |
| |
Comments