Whitelist from own domain. http://mosquito.wordpress.org/view.php?id=999
git-svn-id: http://svn.automattic.com/wordpress/trunk@2562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b8899402d0
commit
5eb42126dd
|
@ -652,7 +652,9 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
|
|||
if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
|
||||
$uri = parse_url($url);
|
||||
$domain = $uri['host'];
|
||||
if ( $wpdb->get_var("SELECT link_id FROM $wpdb->links WHERE link_url LIKE ('%$domain%') LIMIT 1") )
|
||||
$uri = parse_url( get_option('home') );
|
||||
$home_domain = $uri['host'];
|
||||
if ( $wpdb->get_var("SELECT link_id FROM $wpdb->links WHERE link_url LIKE ('%$domain%') LIMIT 1") || $domain == $home_domain )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue