<?php
defined( 'ABSPATH' ) or die(  'No script kiddies please!' );
$post_id = get_the_id();
$yahosein_options = get_post_meta( $post_id, '_yahosein_options', true );
?>
<div class="widget_wrapper online_store_product background_product_wrapper">
  <?php
  /**
   * هماهنگی با پلاگین
   * https://wordpress.org/plugins/breadcrumb-navxt/
   */
  if(function_exists('bcn_display') )
  {
  ?>
  <ul class="breadcrumb">
      <li><a href="<?php bloginfo('url' ); ?>"><i class="fa fa-home"></i></a></li>
      <?php bcn_display(); ?>
  </ul>
  <?php
  }
  ?>

<div class="widget_content">
      <div class="text_contect">
       <h1 class="post_title"><?php the_title(); ?></h1>
      <p class="sub_text"><?php yahosein_posted_on(); ?></p>


  <div class="widget_content">
      <div class="images">
      	<?php the_post_thumbnail('full',array('class'=>'img_book_roman img-responsive wp-post-image pic_news  wp-post-image" ')); ?>
<!--           <a href="#" itemprop="image" class="product_main_image" title="" data-rel="prettyPhoto">
              <img src="assets/img/book.jpg" class="attachment-shop_single" alt="فروش کتاب" width="350"></a> -->
          <div class="clearfix"></div>

      </div>
      <div class="summary">
          <div class="btn_etelat">
          	<?php echo edd_get_purchase_link( array( 'download_id' => get_the_ID() ,'class'=>'single_cart_button btn hover_btn','text'=>'دانلود <i class="fa fa-download"></i>') ); ?>
              <?php if(isset($yahosein_options['link_demo'])){ echo '<a href="'.$yahosein_options['link_demo'].'" class="single_cart_button btn hover_btn"> پیش نمایش <i class="fa fa-eye"></i></a>'; } ?>
              <?php if(isset($yahosein_options['link_help'])){ echo '<a href="'.$yahosein_options['link_help'].'" class="single_cart_button btn hover_btn"> راهنما <i class="fa fa-key"></i></a>'; } ?>
           </div>
          <ul class="product_list_widget">
              <?php if(isset($yahosein_options['ver'])){ echo ' <li> نسخه <span class="pull-left">'.$yahosein_options['ver'].'</span></li>'; } ?>
              <?php
                if(isset($yahosein['opt-downloads-show-download-counts']) && $yahosein['opt-downloads-show-download-counts']==1)
                {
                    ?>
                    <li> تعداد دانلود <span class="pull-left"><?php echo (int)get_post_meta( get_the_ID(), '_edd_download_sales', true ); ?></span></li>
	                <?php
                }
              ?>
              <li> تاریخ نشر <span class="pull-left"><?php the_date(); ?></span></li>
          </ul>
      </div>
      <?php /* ?>
      <div class="product_message message_successful"><i class="fa fa-check-square"></i>خرید شما با موفقیت انجام شد</div>
      <div class="product_message message_unsuccessful"><i class="fa fa-remove"></i>متاسفانه مشکلی در پرداخت رخ داد</div>
      <?php */ ?>
      <div class="clearfix"></div>
      <div class="description">
          <div class="title_description">
              <h3><i class="fa fa-align-justify"></i>توضیحات</h3>
          </div>
          <div class="content_description">
									<?php 

											the_content();
									 ?>
          </div>

      </div>
      <div class="product_meta">
          <hr>
          <span class="tagged_as"><?php the_terms( get_the_ID(), 'download_tag', '<i class="fa fa-tag"></i> برچسب: ', ', ', '' ); ?></span>
          <span class="posted_in"><?php the_terms( get_the_ID(), 'download_category', '<i class="fa fa-tags"></i> دسته: ', ', ', '' ); ?></span>
      </div>
  </div>
</div>
</div></div>

<div class="woocommerce-tabs wc-tabs-wrapper">
		<?php 
			if (comments_open() || get_comments_number()):
				comments_template();
			endif;
		 ?>
</div>
