comment = array('Intercept', 'message'); class Intercept { public static function message($comment) { // 判断用户输入是否大于字符 if (Helper::options()->TextLimit && strlen($comment['text']) > Helper::options()->TextLimit) { $comment['status'] = 'waiting'; } else { // 判断评论内容是否包含敏感词 if (Helper::options()->SensitiveWords) { if (checkSensitiveWords(Helper::options()->SensitiveWords, $comment['text'])) { $comment['status'] = 'waiting'; } } // 判断评论是否至少包含一个中文 if (Helper::options()->LimitOneChinese === 'on') { if (preg_match("/[\x{4e00}-\x{9fa5}]/u", $comment['text']) == 0) { $comment['status'] = 'waiting'; } } } Typecho_Cookie::delete('__typecho_remember_text'); return $comment; } } ?>