»Git Tutorial»How Git topics use the garbage comment interception function
This article briefly introduces the garbage comment function of git theme. I hope it can be used by friends in need
preface
I didn't plan to write this article at first, but seeing some users use the git theme and then ask how to block spam comments or install plug-ins to block spam comments every day, I felt particularly painful, so I slanted this article to teach you.
Procedure
First, enter the background of the theme and enter the article settings
Then you can see the options of spam comments
Here's a brief introduction First, garbage comments generally have foreign languages, and the first must be selected; Second, mandatory. This is the focus of spam comment interception, mainly for user-defined interception; Third, the general garbage comment will leave a link, which can also be selected, but it depends on your specific situation
Depth interception
According to the above selection, we can intercept a lot of junk comments, but sometimes there are some people who have missed the net. So we can use custom interception. The second one selected in the above step is useful here. Sometimes junk comments are advertised, and we can intercept them according to the commenter's IP address, email address, website, and comment content,This is much easier. We open WordPress settings - discussion, see the input box of the comment blacklist, and we enter the keywords we need to block in it. Originally, this input box function only identifies keywords but does not block them. We strengthen this input box to make it have the function of blocking
As shown in the figure, the following keywords have become my blacklist
101.26.235.70xmten114.231.65.219218.28.140.186221.204.241.24114.231.67.56220.200.48.183101.26.235.17114.108.178.229DiscountSuppress this messageproductGood articleexcellent articleschinabomeiban14.108.146.156Marketing120.15.80.19160.9.141.66words flow from the mouth as from the pen of a masterconcise and comprehensivexiaohuamianhelanwangClear content and viewpointContent is as precious as goldForeign Language School
To test the effect of blocking spam comments, you can try to take blacklist words with your comments to see how it will work
@DreamerThe reason why the git theme comment is stuck is that the email configuration is not good. It should be that the function of sending email to notify the webmaster after checking the comment, but if the email is not well configured, it will be sent unsuccessfully and wait for the results to return, and the webpage will be stuck.Method 1 solves the configuration problem, and method 2 removes the email notification function.
After testing, it should be wp includes/comment.php, about 1983 lines of do_action ('comment_post ', $comment_ID, $commentdata ['comment_approved'], $commentdata);The email sent caused the card to submit comments. I hope the blogger can modify it...