How to Disable Self Pingbacks in WordPress

Updated on:

// 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');

Sobre Jose Manuel

I am José Manuel. I am writing about things I know and things that I am learning about WordPress. I hope you find this blog useful.