$v) { $mk_dieonspam_config[$k]=$v; } } else update_option("mk_dieonspam_options",$mk_dieonspam_config); function mk_check_non_english ( $comment ) { global $mk_dieonspam_config; global $wpdb; $str = $comment['comment_content']; $author = $comment['comment_author']; $email = $comment['comment_author_email']; $ok_to_comment = 0; if ( $author != '' && $email != '' ) { $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1"); } if ($mk_dieonspam_config['allow_no_links'] == 1) if ( preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", $str, $out) == 0 ) $ok_to_comment=1; // Check # of external links if (( 1 != $ok_to_comment ) && (preg_match('/[^\s -~]+/', $str) == 0)) { header('Content-Type: text/html; charset=UTF-8'); ?>