In the past 3 days ,every day there were almost 100 spam comments. The Askmit recognized these spams ,but i have to delete these spams myself .I dislike to do this ,so i reactived the Math comment spam protection plugin.However the plugin dosen’t work very well, if u post a comment with the answer blank or wrong ,it will just show u the fallow error message like this:
WordPress ? Error
ERROR: Somethin here.
The error message can be located in the wp-includes/functions.php file at the line 2740:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
< ?php echo $title ?>
< ?php
if ( 'rtl' == $text_direction ) : ?>
< ?php endif; ?>
< ?php endif; ?>
< ?php echo $message; ?>
But the error was caused by the wp_die() function in the file plugins/math-comment-spam-protection/math-comment-spam-protection.php at the line 217:
switch ($result) {
case 'No answer':
wp_die( apply_filters('pre_comment_content', stripslashes($this->g_opt['mcsp_opt_msg_wrong_answer'])) );
break;
case 'Wrong answer':
wp_die( apply_filters('pre_comment_content', stripslashes($this->g_opt['mcsp_opt_msg_wrong_answer'])) );
break;
}
The error message was posted by the wp_die() function,vie google i found that the wp_die() funciton is just do the same thing as die() fuction.So i replaced the wp_die() with die(),then the error message disappered.lol.
switch ($result) {
case 'No answer':
echo "";
die();
break;
case 'Wrong answer':
echo "";
die();
break;
}
1 comment
Online Casino Links – Online Casino Rewards, Black Jack Ballroom Casino.