<?php if(isset($settings['block_title_show']) && $settings['block_title_show'] == 'yes'): 

$block_title_class = (!isset($block_title_class)) ? '' : $block_title_class;
$block_title_class .= 'ts-title block-title-' . $settings['block_title_style'];


$block_title_link = (isset($settings['block_title_url_show']) && $settings['block_title_url_show'] == 'yes')
                    ? '<a class="view-all-link float-right" href="'.$settings['block_title_url']['url'].'" >' .  $settings['block_title_url_text'] . '</a>'
                    : '' ;
$block_title_class .= (empty($block_title_link)) ? '' : ' has_view_all_link';
?>

   <?php switch($settings['block_title_style']): 
   case 'style1': ?>
   <<?php echo esc_attr($settings['block_title_markup']); ?> class="<?php echo esc_attr($block_title_class); ?> float-left">
      <span class="title-before"></span>
      <?php echo esc_html($settings['block_title_text']); ?>
      </<?php echo esc_attr($settings['block_title_markup']); ?>>
      <?php echo vinkmag_kses($block_title_link ); ?>
      <?php if(!isset($remove_clearfix)): ?>
         <div class="clearfix"></div>
      <?php endif; ?>
      <?php break; ?>

   <?php case 'style2': ?>
   <<?php echo esc_attr($settings['block_title_markup']); ?> class="title-bg <?php echo esc_attr($block_title_class); ?> ">
      <span class="title-text"> <?php echo esc_html($settings['block_title_text']); ?></span>
      <span class="title-after"></span>
      <?php echo vinkmag_kses($block_title_link ); ?>
      <?php if(!isset($remove_clearfix)): ?>
         <div class="clearfix"></div>
      <?php endif; ?>

   </<?php echo esc_attr($settings['block_title_markup']); ?>>

   <?php break; ?>
<?php case 'style6': ?>
   <div class="ts-grid-box ts-category-title">
      <<?php echo esc_attr($settings['block_title_markup']); ?> class="<?php echo esc_attr($block_title_class); ?>">
      <span class="title-before"></span>
      <?php echo esc_html($settings['block_title_text']); ?>
      <span class="title-after"></span>
      <?php echo vinkmag_kses($block_title_link ); ?>
      <?php if(!isset($remove_clearfix)): ?>
         <div class="clearfix"></div>
      <?php endif; ?>

      </<?php echo esc_attr($settings['block_title_markup']); ?>>
   </div>
<?php break; ?>

<?php case 'style7': ?>
   <<?php echo esc_attr($settings['block_title_markup']); ?> class="title-bg <?php echo esc_attr($block_title_class); ?>">
      <span class="title-text"> <?php echo esc_html($settings['block_title_text']); ?></span>
      <span class="title-after"></span>
      <?php echo vinkmag_kses($block_title_link ); ?>
      <?php if(!isset($remove_clearfix)): ?>
         <div class="clearfix"></div>
      <?php endif; ?>
   </<?php echo esc_attr($settings['block_title_markup']); ?>>
<?php break; ?>

<?php endswitch; ?>
<?php endif; ?>

