'; $comments_label .= sprintf( us_translate_n( '%s Comment', '%s Comments', $comments_number ), $comments_number ); $comments_label .= '. '; $comments_label .= '' . __( 'Leave new', 'us' ) . ''; comments_number( us_translate( 'No Comments' ), $comments_label, $comments_label ); ?>

'us_comment_start', 'end-callback' => 'us_comment_end', ) ); ?>
logged in to post a comment.' ), wp_login_url( get_permalink() ) ); ?>
array( 'type' => 'textarea', 'name' => 'comment', 'placeholder' => us_translate_x( 'Comment', 'noun' ), 'required' => TRUE, 'icon' => $with_icons ? 'far|edit' : '', ), 'author' => array( 'type' => 'text', 'name' => 'author', 'placeholder' => us_translate( 'Name' ), 'required' => get_option( 'require_name_email' ), 'value' => $commenter['comment_author'], 'icon' => $with_icons ? 'far|user' : '', ), 'email' => array( 'type' => 'email', 'name' => 'email', 'placeholder' => us_translate( 'Email' ), 'required' => get_option( 'require_name_email' ), 'value' => $commenter['comment_author_email'], 'icon' => $with_icons ? 'far|envelope' : '', ), ); // Add Cookie Consent field if it's enabled at Settings > Discussion if ( has_action( 'set_comment_cookies', 'wp_set_comment_cookies' ) && get_option( 'show_comments_cookies_opt_in' ) ) { $fields['cookies'] = array( 'type' => 'agreement', 'value' => us_translate( 'Save my name and email in this browser for the next time I comment.' ), 'name' => 'wp-comment-cookies-consent', 'checked' => FALSE, ); } $fields = apply_filters( 'us_comment_form_fields', $fields ); $json_data = array( 'no_content_msg' => __( 'Fill out this field', 'us' ), 'no_name_msg' => __( 'Fill out this field', 'us' ), 'no_email_msg' => us_translate( 'Please enter a valid email address.' ), ); $comment_form_args = array( 'fields' => array() ); foreach ( $fields as $field_name => $field ) { if ( $field_name == 'comment' ) { $comment_form_args['comment_field'] = us_get_template( 'templates/form/' . $field['type'], $field ); } else { $comment_form_args['fields'][ $field_name ] = us_get_template( 'templates/form/' . $field['type'], $field ); } } $comment_form_args['fields'] = apply_filters( 'comment_form_default_fields', $comment_form_args['fields'] ); $comment_form_args['submit_button'] = ''; comment_form( $comment_form_args ); // Echoing json to comments.js to pass admin-ajax.php URL and messages echo ''; } ?>