- 2007-05-01 (火) 21:59
- Tags: wordpress
wordpressをインストールしたフォルダのwp-comments-post.phpを、以下のように変更する。
[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.’) );
}
[/php]
上記の箇所を
[php]
if ( get_option(’require_name_email’) && !$user->ID ) {
if (” == $comment_author )
wp_die( __(’Error: please fill the required fields (name).’) );
}
[/php]
このように変更することで、mail欄の空欄チェックをスルーできる。
スパムにどう影響するかは未知なので、しばらく様子みてみます。
- Newer: ライトセイバーとPS9
- Older: ページテンプレートを追加する
Comments:1
- ゲスト 07-12-27 (木) 10:49
-
Add Your Comment
Trackback+Pingback:1
- TrackBack URL for this entry
- http://www.masayashi.com/2007/05/01/13/trackback
- Listed below are links to weblogs that reference
- wordpressでコメント投稿時にメールアドレスを要求しない from 王様の箱庭











