Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable self-pings #7

Open
ajaydsouza opened this issue Apr 26, 2022 · 0 comments
Open

Disable self-pings #7

ajaydsouza opened this issue Apr 26, 2022 · 0 comments
Milestone

Comments

@ajaydsouza
Copy link
Collaborator

function no_self_ping( &$links ) {
$home = get_option( 'home' );
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, $home ) )
unset($links[$l]);
}
add_action( 'pre_ping', 'no_self_ping' );

Via: https://wpmudev.com/blog/daily-tip-3-ways-to-remove-wordpress-self-pings/

@ajaydsouza ajaydsouza added this to the 2.2.0 milestone Apr 26, 2022
@ajaydsouza ajaydsouza modified the milestones: 2.2.0, 2.3.0 Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant