wordpress教程防wordpress广告的方法 评论中包含过多链接不可提交

时间:2021-01-20 16:41:14
【文件属性】:
文件名称:wordpress教程防wordpress广告的方法 评论中包含过多链接不可提交
文件大小:24KB
文件格式:PDF
更新时间:2021-01-20 16:41:14
OR pr pre 写了一年多WordPress,除了感受到它的强大,还有spam… 虽然Akismet阻挡了四五K的spam,但是一条一条审核还是太过麻烦,写个方法来处理一下 复制代码代码如下:function spamCheck( $incoming_comment ) { $pattern = ‘/[一-龥]/u’; if(!preg_match($pattern, $incoming_comment[‘comment_content’])) { wp_die( ‘You should type some Chinese word!’ ); } if(substr_count($incoming_comm

网友评论