HEX
Server: Apache
System: Linux nc-ph-0707-26.instaforreviews.com 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User: qirgxuo4hkuv (1004)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /home/qirgxuo4hkuv/public_html/koracheap.com/wp-content/themes/rehub-theme/comments.php
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
<div id="comments" class="clearfix">
<?php if(rehub_option('rehub_widget_comments') && comments_open()) : ?><?php echo wp_specialchars_decode( stripslashes(rehub_kses(rehub_option('rehub_widget_comments')))); ?><div style="margin-bottom:15px; clear:both"></div><?php endif; ?>
<?php if(rehub_option('rehub_disable_comments') != '1') :?>
    <div class="post-comments">
        <?php
            if ( comments_open() ) :
            echo "<div class='title_comments'>";
            $title_nocomments = (rehub_option('rehub_commenttitle_text') != '') ? rehub_option('rehub_commenttitle_text') : esc_html__('We will be happy to hear your thoughts','rehub-theme');
            comments_number($title_nocomments, esc_html__('1 Comment','rehub-theme'), '% ' . esc_html__('Comments','rehub-theme') );
            echo "</div>";
            endif;
        ?>
    <?php if ((rehub_option('type_user_review') == 'full_review' || rehub_option('type_user_review') == 'user') && vp_metabox('rehub_post.rehub_framework_post_type') == 'review' && get_comments_number() > 1) :?>
        <div id="rehub-comments-tabs" class="mb30" data-postid = "<?php echo get_the_ID();?>">
            <span data-tabID="1" data-posttype="post" class="active"><?php esc_html_e('Show all', 'rehub-theme'); ?></span>
            <span data-tabID="2" data-posttype="post"><?php esc_html_e('Most Helpful', 'rehub-theme'); ?></span>
            <span data-tabID="3" data-posttype="post"><?php esc_html_e('Highest Rating', 'rehub-theme'); ?></span>
            <span data-tabID="4" data-posttype="post"><?php esc_html_e('Lowest Rating', 'rehub-theme'); ?></span>
            <a href="#respond" class="rehub_scroll add_user_review_link def_btn"><?php esc_html_e("Add your review", "rehub-theme"); ?></a>
        </div>
    <?php endif ;?>
    <div id="tab-1">
        <ol class="commentlist">
            <?php

                $commenter = wp_get_current_commenter();
                $comment_author_email = $commenter['comment_author_email'];
                $user_ID = get_current_user_id();

                $comment_args = array(
                  'post_id' => get_the_ID(),
                  'orderby' => 'comment_date',
                  'order'   => 'DESC',
                  'update_comment_meta_cache' => false,
                  'status'  => 'approve',                    
                );

                if ( $user_ID ) {
                    $comment_args['include_unapproved'] = array( $user_ID );
                } elseif ( ! empty( $comment_author_email ) ) {
                    $comment_args['include_unapproved'] = array( $comment_author_email );
                }                

                $comments_v = get_comments($comment_args);                

                wp_list_comments(array(
                  'avatar_size'   => 50,
                  'max_depth'     => 4,
                  'style'         => 'ul',
                  'callback'      => 'rehub_framework_comments',
                  'reverse_top_level' => (get_option('comment_order')==='asc' ? 1 : 0),
                ), $comments_v);
                unset($comments_v);
            ?>
        </ol>
        <div id='comments_pagination'>
                <?php paginate_comments_links(array('prev_text' => '&laquo;', 'next_text' => '&raquo;')); ?>
        </div>      
    </div>

    <ol id="loadcomment-list" class="commentlist">
    </ol>
        <?php
            $custom_comment_field = '<textarea id="comment" name="comment" cols="30" rows="10" aria-required="true"></textarea>';
            $commenter = wp_get_current_commenter();
            comment_form(array(
                'comment_field'         => $custom_comment_field,
                'comment_notes_after'   => '',
                'logged_in_as'          => '',
                'comment_notes_before'  => '',
                'title_reply'           => esc_html__('Leave a reply', 'rehub-theme'),
                'cancel_reply_link'     => esc_html__('Cancel reply', 'rehub-theme'),
                'label_submit'          => esc_html__('Submit', 'rehub-theme'),
                'fields' => apply_filters( 'comment_form_default_fields', array(

                    'author' =>
                        '<div class="usr_re"><input id="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .'" name="author" placeholder="'.__('Name', 'rehub-theme').'"></div>',

                    'email' =>
                        '<div class="email_re"><input id="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) .'" name="email" placeholder="'.__('E-mail', 'rehub-theme').'"></div>',

                    'url' =>
                        '<div class="site_re end"><input id="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) .'" name="url" placeholder="'.__('Website', 'rehub-theme').'"></div><div class="clearfix"></div>',
                )
              ),
            ));
         ?>
    </div> <!-- end comments div -->
<?php endif;?>
</div>