HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec 1 20:10:50 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/dev/dev-mentoring-wp/wp-content/themes/mentoring/comments.php
<?php
/**
 * The template for displaying comments
 *
 * This is the template that displays the area of the page that contains both the current comments
 * and the comment form.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package mentoring
 */
/*
 * If the current post is protected by a password and
 * the visitor has not yet entered the password we will
 * return early without loading the comments.
 */
if (post_password_required()) {
    return;
}

$comment_count = get_comments_number();
$retina_mult = mentoring_get_retina_multiplier();
?>

<div id="comments" class="comments-area">
    <div class="comments-count">
<?php if (have_comments()) : ?>
<h3 class="title"><?php printf(_n('One Comment', '%s Comments', get_comments_number(), 'mentoring'), number_format_i18n(get_comments_number())); ?></h3>

<?php endif; ?>
</div>
  <?php  if (have_comments()) : ?>
        
        <ol class="comment-list">
            <?php
            wp_list_comments(
                array(
                    'walker' => new mentoring_Walker_Comment(),
                    'avatar_size' => 100 * $retina_mult,
                    'style' => 'ol',
                    'short_ping' => true,
                )
            );
            ?>
        </ol>
        <?php
        the_comments_navigation();
    endif;

    // If comments are closed and there are comments, let's leave a little note, shall we?
    if (!comments_open()) : 
        ?>
        <p class="no-comments"><?php esc_html_e('Comments are closed.', 'mentoring'); ?></p>
    <?php
    endif;

    $required = get_option('require_name_email');
    $aria_required = ($required ? " aria-required='true'" : '');
    $commenter = wp_get_current_commenter();
    $consent = empty($commenter['comment_author_email']) ? '' : ' checked="checked"';
    $comments_args = array(
        'comment_notes_after' => '',
        'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s sigma_btn">%4$s <i class="far fa-comments"></i></button>',
        'fields' => apply_filters(
            'mentoring_comment_form_fields',
            array(
                'author' => '<div class="row"><div class="col-sm-6 col-12"><div class="form-group comment-form-author">' .
                    '<input class="form-control" id="author" placeholder="' . esc_attr__('Name', 'mentoring') . '*" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_required . ' />' .
                    '</div></div>',
                'email' => '<div class="col-sm-6 col-12"><p class="form-group comment-form-email">' .
                    '<input class="form-control" id="email" placeholder="' . esc_attr__('Email', 'mentoring') . '*" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_required . ' />' .
                '</p></div>',
                'url' => '<div class="col-sm-12 col-12"><p class="form-group comment-form-url">' .
                    '<input class="form-control" id="url" name="url" placeholder="' . esc_attr__('Website', 'mentoring') . '" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" />' .
                    '</p></div>',
                'cookies' => '<div class="col-sm-12 col-12"><p class="form-group comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
                    '<label for="wp-comment-cookies-consent">' . esc_html__('Save my name, email, and website in this browser for the next time I comment.', 'mentoring') . '</label></p></div>',
            )
        ),
        'comment_field' => '<div class="col-sm-12 col-12"><p class="formg-group comment-form-comment">' .
            '<textarea class="form-control" id="comment" name="comment" placeholder="' . esc_attr__('Enter your comment here...', 'mentoring') . '" cols="45" rows="8" aria-required="true"></textarea>' .
            '</p></div>',
    );
    comment_form($comments_args);
    ?>
</div>