非插件实现WordPress阻止站内文章互相Pingback

  • A+
所属分类:Wordpress
/**
    *WordPress 阻止站内文章互相 Pingback
*/
function Bing_noself_pingback( &$links ){
    $url = get_bloginfo( 'url' );
    foreach( $links as $key => $value ) if( strpos( $value, $url ) === 0 ) unset( $links[$key] );
}
add_action( 'pre_ping', 'Bing_noself_pingback' );

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: