. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 162.0.212.4 / Your IP :
216.73.216.14 [
Web Server : LiteSpeed System : Linux premium146.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : alshnoli ( 2431) PHP Version : 8.3.28 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/alshnoli/public_html/wp-content/plugins/us-core/templates/ |
Upload File : |
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* List of Post Comments with response form
*/
$comments_number = get_comments_number();
?>
<div id="comments" class="w-comments">
<?php if ( have_comments() ) { ?>
<h4 class="w-comments-title">
<?php
$comments_label = '<span>';
$comments_label .= sprintf( us_translate_n( '%s <span class="screen-reader-text">Comment</span>', '%s <span class="screen-reader-text">Comments</span>', $comments_number ), $comments_number );
$comments_label .= '.</span>';
if ( comments_open() ) {
$comments_label .= ' <a href="#respond">' . __( 'Leave new', 'us' ) . '</a>';
}
comments_number( us_translate( 'No Comments' ), $comments_label, $comments_label );
?>
</h4>
<ul class="w-comments-list">
<?php
wp_list_comments(
array(
'callback' => 'us_comment_start',
'style' => 'ul',
)
);
?>
</ul>
<div class="w-comments-pagination">
<?php previous_comments_link() ?>
<?php next_comments_link() ?>
</div>
<?php } ?>
<?php if ( comments_open() ) {
if ( get_option( 'comment_registration' ) AND ! is_user_logged_in() ) {
?>
<div class="w-comments-form-text"><?php printf( us_translate( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( get_permalink() ) ); ?></div>
<?php
} else {
$commenter = wp_get_current_commenter();
$fields = array(
'comment' => array(
'type' => 'textarea',
'name' => 'comment',
'placeholder' => us_translate_x( 'Comment', 'noun' ),
'required' => TRUE,
),
'author' => array(
'type' => 'text',
'name' => 'author',
'placeholder' => us_translate( 'Name' ),
'required' => get_option( 'require_name_email' ),
'value' => $commenter['comment_author'],
),
'email' => array(
'type' => 'email',
'name' => 'email',
'placeholder' => us_translate( 'Email' ),
'required' => get_option( 'require_name_email' ),
'value' => $commenter['comment_author_email'],
),
);
// 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, email, and website 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'] = '<button type="submit" class="w-btn us-btn-style_1"><span class="w-btn-label">' . us_translate( 'Post Comment' ) . '</span></button>';
comment_form( $comment_form_args );
// Echoing json to comments.js to pass admin-ajax.php URL and messages
echo '<div class="us-comments-json hidden"' . us_pass_data_to_js( $json_data ) . '></div>';
}
}
?>
</div>