How to Disable Self Pingbacks in WordPress

Manuel campos -
// prevent self-pings
function shapeSpace_prevent_self_pings(&$links) {
	
	$home = get_option('home');
	
	foreach ($links as $l => $link) {
		
		if (0 === strpos($link, $home)) unset($links[$l]);
		
	}
	
}
add_action('pre_ping', 'shapeSpace_prevent_self_pings');
JM
About me
I am José Manuel. I am writing about things I know and things that I am learning about WordPress. I hope you find the content of this blog useful.
Linktree

You might also Like...