//contact form7 海外スパムメール対ç–
add_filter('wpcf7_validate_textarea', 'wpcf7_validation_textarea_hiragana', 10, 2);
add_filter('wpcf7_validate_textarea*', 'wpcf7_validation_textarea_hiragana', 10, 2);
function wpcf7_validation_textarea_hiragana($result, $tag)
{
$name = $tag['name'];
$value = (isset($_POST[$name])) ? (string) $_POST[$name] : '';
if ($value !== '' && !preg_match('/[ã-ã‚“]/u', $value)) {
$result['valid'] = false;
$result['reason'] = array($name => 'é€ä¿¡ã§ãã¾ã›ã‚“。');
}
return $result;
}