プラグインなどは現状情報がないです。
・http://ja.forums.wordpress.org/topic/443?replies=6
・http://ja.forums.wordpress.org/topic/397?replies=5
コアファイル修正になりそうですが、私にはどこ修正すればいいか不明です。
詳しい人に期待・・・。
#最近これ多くて申し訳ない。
うーん、wp-comments-post.phpは、どうやってフックしたらいいんでしょうかね…
やりようがないので、対処療法的にwp-comments-post.phpを変更できなくもないですが。
if ( get_option('require_name_email') && !$user->ID ) {
if ( 6 > strlen($comment_author_email) || '' == $comment_author )
wp_die( __('Error: please fill the required fields (name, email).') );
elseif ( !is_email($comment_author_email))
wp_die( __('Error: please enter a valid email address.') );
}
というのを、以下のコードで置き換え。
if ( get_option('require_name_email') && !$user->ID ) {
if ( 6 > strlen($comment_author_email) || '' == $comment_author )
wp_die( __('Error: please fill the required fields (name, email).') );
elseif ( !is_email($comment_author_email))
wp_die( __('Error: please enter a valid email address.') );
}
if(!$user->ID){
if ('' == $comment_author)
wp_die('名前を入力して下さい。');
}
むむむ…詳しい人に期待。
ウソアドレスを与えても良いなら、テーマフォルダに script.js を作成して:
jQuery(document).ready(function($){
$("#commentform").submit(function(){
if($("input#email").val() == ""){
var now = new Date();
$("input#email").val("comment-" + now.getTime() + "@no.email")
}
return true;
});
});
functions.php に以下を追加。
wp_enqueue_script('my_script', get_bloginfo('template_url'). '/script.js', array('jquery'), false, true);
email欄を見せたくないなら comments.php 内の当該 input タグで type=”hidden” とすると良いです。label タグは削除して OK。