Hi,
anyone knows a way to avoid self-pings (trackbacks) without the need of a plugin?
(too much info around the internet, but none seems to be concise)
thanks
Hi,
anyone knows a way to avoid self-pings (trackbacks) without the need of a plugin?
(too much info around the internet, but none seems to be concise)
thanks
I don't think you can, not without disabling pingsbacks for everything. The good news though is that there is a plugin that's sole purpose is to disable self pingbacks.
http://wordpress.org/extend/plugins/no-self-ping/
Perhaps you could look within the plugin and figure out the code to use in your functions.php file so you don't end up using the plugin.
yes, that's what I was thinking about :)
thanks
Not tested, but here's a one liner for your functions.php file ;)
PHP Code:add_action( 'pre_ping', create_function( '&$links', 'foreach ( $links as $k => $link ) if ( 0 === strpos( $link, get_option( "home" ) ) ) unset( $links[$k] );' ) );
that doesn't work
Discovering Wordpress
Just use the plugin. It's *tiny*. It doesn't add any real load. Simpler = better.