Skip to content

Commit

Permalink
Use comment or empty string for the comment_type
Browse files Browse the repository at this point in the history
  • Loading branch information
kudlav committed Jul 31, 2020
1 parent 9db5243 commit f5c23e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion anti-spam.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ function antispamrel_check_comment($commentdata) {
$flag = null;

switch ($commentdata['comment_type']) {
case '': // comment
case '': // legacy comment WP<5.5
case 'comment':
if(!is_user_logged_in() && antispamrel_check_for_spam()) // logged in user is not a spammer
$flag = __('Comment is a spam.', 'anti-spam-reloaded');
break;
Expand Down

0 comments on commit f5c23e4

Please sign in to comment.