WP cocoon コメントフォーム 名前の初期値設定



 


  *' );
  //コメント案内メッセージ
  $comment_info_msg = get_comment_information_message();
  $comment_info_msg_tag = null;
  if ($comment_info_msg) {
    $comment_info_msg_tag = '
'.$comment_info_msg.'
'; } //コメントフォームの引数 $post_id = get_the_ID(); $user = wp_get_current_user(); $user_identity = $user->exists() ? $user->display_name : ''; // add for $comment_author if( $commenter['comment_author'] == "" ){ $comment_author = "「ぶーん」と逆襲するななC"; }else{ $comment_author = esc_attr( $commenter['comment_author'] ); } $fields = array( 'author' => '

' .( $req ? ' *' : '' ) .'

' ); // add end for $comment_author $args = array( 'fields' => apply_filters( 'comment_form_default_fields', $fields ), // add for $comment_author 'title_reply' => get_comment_form_heading(), 'label_submit' => get_comment_submit_label(), 'logged_in_as' => '

' . sprintf( /* translators: 1: edit user link, 2: accessibility text, 3: user name, 4: logout URL */ __( 'Logged in as %3$s. Log out?' ), get_edit_user_link(), /* translators: %s: user name */ esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) ) ) . '

'.$comment_info_msg_tag, 'comment_notes_before' => '

' . __( 'Your email address will not be published.' ) . ''. ( $req ? $required_text : '' ) . '

'.$comment_info_msg_tag, ); /* 上部コメント */ echo '

コメント

タイトルとURLをコピーしました