mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 08:37:55 +02:00
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user