check_comment should return false if there are no comment moderation keys.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
07fd11069f
commit
3cd3999079
|
@ -1568,7 +1568,8 @@ function get_posts($args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_comment($author, $email, $url, $comment, $user_ip) {
|
function check_comment($author, $email, $url, $comment, $user_ip) {
|
||||||
if (1 == get_settings('comment_moderation')) return false;
|
if (1 == get_settings('comment_moderation')) return false; // If moderation is set to manual
|
||||||
|
if ('' == trim( get_settings('moderation_keys') ) ) return true; // If moderation keys are empty
|
||||||
$words = explode("\n", get_settings('moderation_keys') );
|
$words = explode("\n", get_settings('moderation_keys') );
|
||||||
foreach ($words as $word) {
|
foreach ($words as $word) {
|
||||||
$word = trim($word);
|
$word = trim($word);
|
||||||
|
@ -1584,7 +1585,7 @@ function check_comment($author, $email, $url, $comment, $user_ip) {
|
||||||
$number = count($all_links[0]);
|
$number = count($all_links[0]);
|
||||||
if ($number >= get_settings('comment_max_links')) return false;
|
if ($number >= get_settings('comment_max_links')) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue