PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.1
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / front / FrontViews / Frontcampaigns / tmpl / choose_template.php

choose_template.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.1, at front/FrontViews/Frontcampaigns/tmpl/choose_template.php

92 lines 4.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals.
3 defined('ABSPATH') || die('Restricted Access');
4 ?>
5 <div class="grid-x grid-margin-x margin-top-3">
6 <?php
7 $campaignType = empty($data['campaign_type']) ? '' : $data['campaign_type'];
8 if (empty($data['allMails']) && empty($data['search']) && empty($data['tag']) && empty($data['status'])) { ?>
9 <div class="grid-x cell text-center">
10 <div class="cell medium-4"></div>
11 <div class="cell medium-4">
12 <a
13 href="<?php echo esc_url(
14 acym_completeLink(
15 acym_getVar('cmd', 'ctrl').'&task=edit&step=editEmail&from=-1&type_editor=acyEditor&campaignId='.esc_attr(
16 $data['campaignID']
17 ).'&campaign_type='.$campaignType
18 )
19 ); ?>"
20 class="button expanded"
21 id="acym__templates__choose__create__empty">
22 <?php echo esc_html(acym_translation('ACYM_START_FROM_EMPTY_TEMPLATE')); ?>
23 </a>
24 </div>
25 </div>
26 <?php } else { ?>
27 <div class="cell grid-x margin-bottom-2 grid-margin-x">
28 <div class="medium-auto cell">
29 <?php acym_filterSearch($data['search'], 'mailchoose_search', 'ACYM_SEARCH'); ?>
30 </div>
31 <div class="grid-x medium-shrink text-center cell acym__templates__choose__type-templates">
32 <a
33 href="<?php echo esc_url(
34 acym_completeLink(
35 acym_getVar('cmd', 'ctrl').'&task=edit&step=editEmail&from=-1&type_editor=acyEditor&campaignId='.intval(
36 $data['campaignID']
37 ).'&campaign_type='.$campaignType
38 )
39 ); ?>"
40 class="button"
41 id="acym__templates__choose__create__empty">
42 <?php echo esc_html(acym_translation('ACYM_START_FROM_EMPTY_TEMPLATE')); ?>
43 </a>
44 </div>
45 </div>
46 <?php if (empty($data['allMails'])) { ?>
47 <h1 class="cell acym__listing__empty__search__title text-center"><?php echo esc_html(acym_translation('ACYM_NO_RESULTS_FOUND')); ?></h1>
48 <?php } else { ?>
49 <div class="grid-x grid-padding-x grid-padding-y grid-margin-x grid-margin-y medium-up-3 small-up-1 cell">
50 <?php
51 foreach ($data['allMails'] as $oneTemplate) {
52 ?>
53 <div class="cell grid-x acym__templates__oneTpl acym__listing__block">
54 <input type="hidden"
55 class="acym__templates__oneTpl__choose"
56 value="<?php echo esc_url(
57 acym_completeLink(
58 acym_getVar('cmd', 'ctrl').'&task=edit&step=editEmail&from='.$oneTemplate->id.'&campaignId='.intval(
59 $data['campaignID']
60 ).'&campaign_type='.$campaignType
61 )
62 ); ?>" />
63 <div class="cell acym__templates__pic text-center">
64 <img src="<?php echo esc_url(acym_getMailThumbnail($oneTemplate->thumbnail)); ?>" alt="<?php echo esc_attr($oneTemplate->name); ?>" />
65 <?php
66 if ($oneTemplate->drag_editor) {
67 echo '<div class="acym__templates__choose__ribbon acyeditor">'.esc_html(acym_translation('ACYM_DD_EDITOR')).'</div>';
68 } else {
69 echo '<div class="acym__templates__choose__ribbon htmleditor">'.esc_html(acym_translation('ACYM_HTML_EDITOR')).'</div>';
70 }
71 ?>
72 </div>
73 <div class="cell grid-x acym__templates__footer text-center">
74 <div class="cell acym__templates__footer__title" title="<?php echo esc_attr($oneTemplate->name); ?>">
75 <?php
76 if (strlen($oneTemplate->name) > 55) {
77 $oneTemplate->name = substr($oneTemplate->name, 0, 50).'...';
78 }
79 echo esc_html($oneTemplate->name);
80 ?>
81 </div>
82 <div class="cell"><?php echo esc_html(acym_date($oneTemplate->creation_date, 'ACYM_DATE_FORMAT_LC3')); ?></div>
83 </div>
84 </div>
85 <?php } ?>
86 </div>
87 <?php $data['pagination']->display('mailchoose'); ?>
88 <?php } ?>
89 <?php } ?>
90 </div>
91 <?php
92