| 1 |
<?php |
| 2 |
// Include the necessary WordPress function to check plugin status |
| 3 |
if (!function_exists('is_plugin_active')) { |
| 4 |
include_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
| 5 |
} |
| 6 |
|
| 7 |
// Check if the Emailkit Pro plugin is active |
| 8 |
$is_emailkit_pro_active = is_plugin_active('emailkit-pro/emailkit-pro.php'); |
| 9 |
|
| 10 |
?> |
| 11 |
<li data-mail-type="<?php echo esc_attr($template['mail_type']); ?>" data-template-type="<?php echo esc_attr(trim($template['title'])); ?>" class="emailkit-template-item emailkit-template-item<?php echo isset($template['package']) ? ' emailkit-template-item--' . esc_attr($template['package']) : ''; ?> |
| 12 |
<?php echo (isset($template['package']) && $template['file'] === '') ? ' emailkit-template-item--go_pro' : ''; ?>"> |
| 13 |
<label> |
| 14 |
<input class="emailkit-template-radio" name="emailkit-editor-template" type="radio" value="<?php echo esc_attr($template['file']); ?>" <?php echo esc_attr(($template['file'] === '' || (!$is_emailkit_pro_active && isset($template['package']) && $template['package'] === 'pro')) ? 'disabled="disabled"' : ''); ?>> |
| 15 |
<div class="emailkit-template-radio-data"> |
| 16 |
<img src="<?php echo esc_url($template['preview-thumb']); ?>" alt="<?php echo esc_attr($template['template_title']) ?>"> |
| 17 |
|
| 18 |
<?php if (isset($template['package']) && $template['package'] === 'pro') : ?> |
| 19 |
<div class="emailkit-template-radio-data--tag"> |
| 20 |
<span class="emailkit-template-radio-data--pro_tag"><?php echo esc_html(ucfirst($template['package'])); ?></span> |
| 21 |
</div> |
| 22 |
<?php endif; ?> |
| 23 |
|
| 24 |
<div class="emailkit-template-footer-content"> |
| 25 |
<?php if (isset($template['template_title']) && $template['template_title'] != '') : ?> |
| 26 |
<div class="emailkit-template-footer-title"> |
| 27 |
<h2><?php echo esc_html($template['template_title']); ?></h2> |
| 28 |
</div> |
| 29 |
<?php endif; ?> |
| 30 |
|
| 31 |
<div class="emailkit-template-footer-links"> |
| 32 |
<?php if (!$is_emailkit_pro_active && isset($template['package']) && $template['package'] === 'pro') : ?> |
| 33 |
<a target="_blank" href="https://wpmet.com/plugin/emailkit/pricing/" class="emailkit-template-footer-links--pro_tag"><i class="emailkit-template-footer-links--icon fas fa-external-link-square-alt"></i><?php echo esc_html__('Buy Pro', 'emailkit'); ?></a> |
| 34 |
<?php endif; ?> |
| 35 |
|
| 36 |
<?php if (isset($template['demo-url']) && $template['demo-url'] != '') : ?> |
| 37 |
<a target="_blank" class="emailkit-template-footer-links--demo_link" href="<?php echo esc_url($template['demo-url']); ?>"><i class="emailkit-template-footer-links--icon far fa-eye"></i><?php echo esc_html__('Demo', 'emailkit'); ?></a> |
| 38 |
<?php endif; ?> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
</label> |
| 43 |
</li> |