<?php
/* 
* Theme: PREMIUMPRESS CORE FRAMEWORK FILE
* Url: www.premiumpress.com
* Author: Mark Fail
*
* THIS FILE WILL BE UPDATED WITH EVERY UPDATE
* IF YOU WANT TO MODIFY THIS FILE, CREATE A CHILD THEME
*
* http://codex.wordpress.org/Child_Themes
*/
if (!defined('THEME_VERSION')) {	header('HTTP/1.0 403 Forbidden'); exit; }

global $CORE, $CORE_UI, $post; 

$pid = $_POST['pid'];

$args = array( 'post_id' => $pid );
$comments = get_comments( $args );

?>

<div class="p-3">
<h4><?php echo __("Comments","premiumpress"); ?></h4>
<hr />

<?php if(empty($comments)){  ?>

<div class="opacity-5"><?php echo __("No Comments found.","premiumpress"); ?></div>

<?php }else{ ?>

    <?php foreach($comments as $c){ ?>
    
    <div class="border rounded p-4 opacity-8 overflow-hidden position-relative">

        <div><?php echo $c->comment_content; ?></div>

        <div class="opapcity-5 small mt-1"><?php echo $c->comment_date; ?></div>

    </div>
    
    <?php } ?>


<?php } ?>
 

</div>