<?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, $LAYOUT, $CORE_UI, $wpdb, $wp_query;
 
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////

$term = get_term_by('slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
$preview = "";
 
if( strlen(_ppt('storelink_'.$term->term_id)) >  2){ 

   $url = _ppt('storelink_'.$term->term_id);  
   if(strlen($url) > 2){
      if(substr($url,0,4) != "http"){
         $url = "https://".$url;
      }

      $preview =  do_shortcode("[SCREENSHOT url='".$url."']");

      $catscreenshot = "";
      if( strlen(_ppt('category_screenshot_'.$term->term_id)) >  2){ 
         $preview  = _ppt('category_screenshot_'.$term->term_id);
      }

   } 


?>
 
<div class="border shadow-sm bg-white position-relative rounded-lg mb-4 hide-mobile">
            
            <div class="fs-lg lh-10 ml-2 mt-1" style="    letter-spacing: -5px;">
            
            <span class="text-success">&bull;</span>
            <span class="text-warning">&bull;</span>
            <span class="text-primary">&bull;</span>
            
            </div>
            <div style="height:200px;" class="bg-light border m-2 position-relative">
            
            <div class="overlay-inner" style="z-index: 1;"></div>
            
            <div class="bg-image" data-bg="<?php echo $preview; ?>"></div> 
            </div>
             
            <div style=" position:absolute; top:25%; z-index:1;" class="w-100 text-center">
            <div style="max-width: 80%;    margin: auto;">
         
            </div>
         
         </div> 
          
         
   <div class="p-2 text-center my-2">

   <a href="<?php echo home_url(); ?>/outtax/<?php echo $term->term_id; ?>/store/"class="btn-block btn-primary btn-lg" target="_blank" data-ppt-btn><?php echo __("Visit Website","premiumpress"); ?></a>

</div>
</div>

<div>

</div>
<?php } ?>