'disable_self_pingbacks', 'title' => 'Disable self-pingbacks', 'desc' => 'Stop WordPress sending pingbacks to its own posts', 'icon' => 'x', 'help' => 'When a post links to another post on your own site, WordPress sends a pingback to itself, which can add a pingback comment to your own post. This removes links to your own site from the list of links to ping. Pingbacks to other sites are still sent.', 'before' => 'Linking to your own post sends a pingback to your own site', 'after' => 'Internal links work as before; no pingbacks to your own site.', 'benefit' => 'Stops pingbacks from your own site showing up on your posts, and saves the requests WordPress makes to itself to send them.', 'level' => 'standard', 'audience' => 'everyone', 'priority' => 6, 'callback' => function () { add_action( 'pre_ping', function ( &$links ) { $home = home_url(); foreach ( $links as $i => $link ) { if ( strpos( $link, $home ) === 0 ) { unset( $links[ $i ] ); } } } ); }, );