• File: comments.php
  • Full Path: /home/chassiw/www/wp-content/themes/reon/comments.php
  • File size: 3.27 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php if (post_password_required()) return; ?>
        
    <div class="content_comments clearfix">
        <div id="comments" class="comments">

            <?php if(have_comments()){ ?>
                <div>
                    <h4 class="number-comments"> 
                        <?php comments_number( esc_html__('0 Comments', 'reon'), esc_html__( '1 Comment', 'reon' ), esc_html__( '% Comments', 'reon' ) ); ?>
                    </h4>
                </div>

            <?php } ?>

            <?php if (have_comments()) { ?>
                <ul class="commentlists">
                    <?php wp_list_comments('callback=reon_theme_comment_clone'); ?>
                </ul>
                <?php
                // Are there comments to navigate through?

                if (get_comment_pages_count() > 1 && get_option('page_comments')) : ?>
                    <footer class="navigation comment-navigation" role="navigation">
                        <div class="nav_comment_text"><?php esc_html_e( 'Comment navigation', 'reon' ); ?></div>
                        <div class="previous"><?php previous_comments_link(__('&larr; Older Comments', 'reon')); ?></div>
                        <div class="next right"><?php next_comments_link(__('Newer Comments &rarr;', 'reon')); ?></div>
                    </footer><!-- .comment-navigation -->
                <?php endif; // Check for comment navigation ?>

                <?php if (!comments_open() && get_comments_number()) : ?>
                    <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'reon' ); ?></p>
                <?php endif; ?>
                
            <?php } ?>

            <?php

            $aria_req = ($req ? " aria-required='true'" : '');
            $comment_args = array(
                'title_reply' => wp_kses('<span class="title-comment">' . esc_html__( 'Leave a Comment', 'reon' ) . '</span>', true),
                'fields' => apply_filters('comment_form_default_fields', array(
                    'author' => '<input type="text" name="author" value="' . esc_attr($commenter['comment_author']) . '"  class="form-control author" placeholder="'. esc_attr__('Your Name','reon') .'" />',
                    'email' => '<input type="text" name="email" value="' . esc_attr($commenter['comment_author_email']) . '" class="form-control email" placeholder="'. esc_attr__('Your Email','reon') .'" />',
                    'phone' => '<input type="text" name="url" value="' . esc_url($commenter['comment_author_url']) . '" class="form-control phone" placeholder="'. esc_attr__('Phone Number','reon') .'" />',            
                    
                )),
                'comment_field' => '<textarea class="form-control" rows="7" name="comment" placeholder="'. esc_attr__('Your Comment ...','reon') .'"></textarea>',
                'label_submit' => esc_html__('SUBMIT','reon'),
                'comment_notes_before' => '',
                'comment_notes_after' => '',

            );
            ?>

            <?php global $post; ?>
            <?php if ('open' == $post->comment_status) { ?>
                <div class="wrap_comment_form">
                    <?php comment_form($comment_args); ?>        
                </div><!-- end commentform -->
            <?php } ?>


        </div><!-- end comments -->
    </div>