Abstract: WordPress is now the use of more and more extensive, WordPress This gadget is passed from abroad, WordPress is also the most used in foreign SEO programs. At the same time with the relevant SEO tools are also more and more development, technology is also getting higher. Remember
WordPress is now the use of more and more extensive, WordPress This gadget is passed from abroad, WordPress is also a foreign SEO use the most programs. At the same time with the relevant SEO tools are also more and more development, technology is also getting higher.
Remember once used an English version of the comment tool can quickly find n many WordPress blog, at the same time can also distinguish what is needed to verify the code, which is not required to verify code, which is the review needs to audit, which is not required to audit, which are comments have jump, which is not to do jump ... A series of options, tools to do very fine, at the same time, as well as proxy landing and other simulated human access functions, although these do very well, but the production of products for our bloggers, especially the Zhong Wenbo Lord, is simply the root of all evils.
Like to buy and sell blog children know, although the comments can bring vitality to the blog, but also a platform for communication, but spam comments flooding is not a good thing, not only waste space resources, but also reduce the content quality of Web pages on the user experience has a negative impact; And for a lot of people mention processing spam comments will think of the use of such as akismet spam comments filter plug-ins, my broken folding June blog just started in accordance with this idea to do, mainly used the following three commonly used methods:
1, WordPress with the Akismet, the default disabled. When you are enabled, you need to register on your Web site and get an API key to use. This API key is free for individual users.
2, Spam free WordPress. The article recommended the other, but see this score is relatively high, so put this.
3, Math Comment Spam homeowner. Add a verification code, let's do a math problem.
But these three plugins, while blocking some spam comments, are often placed in spam comments, but are also deleted manually. At first I felt nothing, but with the breaking up of the blog traffic increase, spam comments more and more, not only the Chinese still have a lot of pure English spam comments, sometimes a day or even reach four hundred or five hundred, delete all tired, so want to ban pure English comments to solve this problem.
Comment Tools differ from the way they are manually filling out forms, often using Ajax portals or wp-comments-post.php or other portals. But no matter where he came from, the role of WP hook should always exist, so I add the following code in the subject template functions.php below, the pure English comment filter, you can solve:
function Scp_comment_post ($incoming _comment) {
$pattern = '/[-龥]/u ';
Ban all comments in English
if (!preg_match ($pattern, $incoming _comment[' comment_content ')) {
Wp_die ("Your should type some Chinese word (like \ Hello \) in your comment to pass the Spam-check, for your patience! Your comments must contain Chinese characters! ");
Return ($incoming _comment);
Add_filter (' preprocess_comment ', ' scp_comment_post ');
This method can make pure English content can not comment, which is better than to mark pure English comments as spam comments, eliminating the time to delete the spam comments.