PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
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
← All changes | front/FrontViews/Frontusers/tmpl/unsubscribepage.php +213 -0 10.1.2 → 11.1.0 View file →
@@ -1,0 +1,213 @@
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="acym__unsubscribe__page grid-x grid-padding-x">
6 + <?php if ($this->config->get('display_unsub_image') === '1') { ?>
7 + <div class="acym__unsubscribe__image__container cell hide-for-small-only">
8 + <?php if (!empty($this->config->get('unsubscribe_image'))) { ?>
9 + <img class="cell padding-3"
10 + src="<?php echo esc_url($this->config->get('unsubscribe_image')); ?>"
11 + alt="">
12 + <?php } else { ?>
13 + <div class="cell padding-3 acym__unsubscribe__image__svg">
14 + <?php
15 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Internal SVG file.
16 + echo $data['svgImage'];
17 + ?>
18 + </div>
19 + <?php } ?>
20 + </div>
21 + <?php } ?>
22 + <?php $classContainer = $this->config->get('display_unsub_image') === '1' ? '' : 'no-image'; ?>
23 + <div class="acym__unsubscribe__form__container cell <?php echo esc_attr($classContainer); ?>">
24 + <div class="cell">
25 + <form action="<?php echo esc_url(acym_frontendLink('frontusers')); ?>" name="unsubscribepage" class="acym_front_page acym__unsubscribe__form">
26 + <fieldset class="grid-x grid-margin-x align-center">
27 + <legend class="show-for-sr"><?php echo esc_html(acym_translation('ACYM_EMAIL_PREFERENCES')); ?></legend>
28 + <div class="acym__unsubscribe__container cell">
29 + <div class="acy__unsubscribe__form__header margin-bottom-3">
30 + <div class="acym__unsubscribe__form__header__image cell padding-bottom-1">
31 + <?php if (!empty($this->config->get('unsubscribe_logo'))) { ?>
32 + <img class="cell" src="<?php echo esc_attr($this->config->get('unsubscribe_logo')); ?>" alt="<?php echo esc_attr(acym_getCMSConfig('sitename')); ?>">
33 + <?php } ?>
34 + </div>
35 + <h1 class="acym__title acym__unsubscribe__title margin-bottom-1">
36 + <?php if (!empty($this->config->get('unsubscribe_title'))) {
37 + echo esc_html($this->config->get('unsubscribe_title'));
38 + } else {
39 + echo esc_html(acym_translation('ACYM_EMAIL_PREFERENCES'));
40 + } ?>
41 + </h1>
42 + <?php if (!empty($data['languages'])) {
43 + acym_select(
44 + $data['languages'],
45 + 'language',
46 + $data['lang'],
47 + ['aria-label' => acym_translation('ACYM_LANGUAGE')],
48 + 'value',
49 + 'text',
50 + 'acym__unsubscribe__language__select',
51 + false,
52 + true
53 + );
54 + }
55 + ?>
56 + </div>
57 + <div class="acym__unsubscribe__lists__container cell margin-bottom-1">
58 + <?php if (empty($data['subscriptions'])) { ?>
59 + <p><?php echo esc_html(acym_translation('ACYM_NO_DATA_TO_DISPLAY')); ?></p>
60 + <p><?php echo esc_html(acym_translation('ACYM_NO_LIST_FOUND_CAN_UNSUB')); ?></p>
61 + <?php } else { ?>
62 + <div class="acym__unsubscribe__lists__listing margin-bottom-1">
63 + <ul class="acym__unsubscribe__lists">
64 + <?php foreach ($data['subscriptions'] as $list) {
65 + if (empty($list->visible)) continue; ?>
66 + <li class="acym__unsubscribe__list__item grid-x">
67 + <div class="acym__unsubscribe__lists__listing cell margin-bottom-1">
68 + <p class="acym__unsubscribe__list__display__name">
69 + <?php echo esc_html(!empty($list->display_name) ? $list->display_name : $list->name); ?>
70 + </p>
71 + <p class="acym__unsubscribe__list__description">
72 + <?php echo !empty($list->description) ? esc_html($list->description) : ''; ?>
73 + </p>
74 + </div>
75 + <div class="acym__unsubscribe__list__switch margin-bottom-1 cell">
76 + <?php
77 + $listName = !empty($list->display_name) ? $list->display_name : $list->name;
78 + acym_switch([
79 + 'name' => 'lists['.$list->id.']',
80 + 'value' => $list->status,
81 + 'attributes' => [
82 + 'name' => 'lists['.$list->id.']',
83 + 'aria-label' => $listName,
84 + ],
85 + ]);
86 + ?>
87 + </div>
88 + </li>
89 + <?php } ?>
90 + </ul>
91 + </div>
92 + <?php } ?>
93 + <div class="acym__unsubscribe__reason__section cell margin-bottom-1">
94 + <div class="acym__unsubscribe__reason__label">
95 + <p class="acym__unsubscribe__reason"><?php echo esc_html(acym_translation('ACYM_SHARE_YOUR_REASONS')); ?></p>
96 + <span class="acym__optional"><?php echo esc_html(acym_translation('ACYM_OPTIONAL')); ?></span>
97 + </div>
98 + <?php if (!empty($data['surveyAnswers'])) {
99 + acym_select(
100 + $data['surveyAnswers'],
101 + 'unsubscribe_selector_reason',
102 + 'acym__unsubscribe__reason__select',
103 + ['aria-label' => acym_translation('ACYM_SHARE_YOUR_REASONS')],
104 + 'value',
105 + 'text',
106 + null,
107 + false,
108 + true
109 + );
110 + ?>
111 + <div class="acym__unsubscribe__reason__label acym__custom__reason__label padding-top-1 is-hidden">
112 + <p class="acym__unsubscribe__reason"><?php echo esc_html(acym_translation('ACYM_CAN_YOU_TELL_MORE')); ?></p>
113 + <span class="acym__optional"><?php echo esc_html(acym_translation('ACYM_OPTIONAL')); ?></span>
114 + </div>
115 + <input type="text"
116 + id="acym__custom__unsubscribe__reason"
117 + name="unsubscribe_custom_reason"
118 + class="is-hidden"
119 + aria-label="<?php echo esc_attr(acym_translation('ACYM_CAN_YOU_TELL_MORE')); ?>">
120 + <input type="hidden" name="unsubscribe_reason">
121 + <?php } else { ?>
122 + <input type="text"
123 + name="unsubscribe_reason"
124 + class="acym__unsubscribe__input__reason"
125 + aria-label="<?php echo esc_attr(acym_translation('ACYM_SHARE_YOUR_REASONS')); ?>">
126 + <?php } ?>
127 + </div>
128 + <div class="acym__unsubscribe__actions grid-x align-center">
129 + <?php if (count($data['subscriptions']) > 1 || empty($data['subscriptions'])) { ?>
130 + <button type="button"
131 + class="button button-secondary cell margin-bottom-1"
132 + id="acym__unsub__all"
133 + onclick="return acymSubmitForm('unsubscribeAll', this);">
134 + <?php echo esc_html(acym_translation('ACYM_UNSUBSCRIBE_ALL')); ?>
135 + </button>
136 + <?php }
137 + if (empty($data['subscriptions'])) { ?>
138 + <button type="button"
139 + class="button button-primary cell margin-bottom-1"
140 + id="acym__unsub__direct"
141 + onclick="return acymSubmitForm('unsubscribe', this);">
142 + <?php echo esc_html(acym_translation('ACYM_UNSUBSCRIBE')); ?>
143 + </button>
144 + <?php } else { ?>
145 + <button type="button"
146 + class="button button-primary cell margin-bottom-1"
147 + id="acym__save"
148 + onclick="return acymSubmitForm('saveSubscriptions', this);">
149 + <?php echo esc_html(acym_translation('ACYM_UPDATE_PREFERENCES')); ?>
150 + </button>
151 + <?php } ?>
152 + </div>
153 + </div>
154 + </div>
155 + <?php
156 + if ($this->config->get('display_built_by', 1)) { ?>
157 + <img class="cell acym__powered__by__image"
158 + src="<?php echo esc_url(ACYM_IMAGES.'editor/poweredby_black.png'); ?>"
159 + alt="Powered by AcyMailing">
160 + <?php } ?>
161 +
162 + </fieldset>
163 + <?php acym_formOptions(); ?>
164 + <input type="hidden" name="user_id" value="<?php echo esc_attr($data['user']->id); ?>">
165 + <input type="hidden" name="user_key" value="<?php echo esc_attr($data['user']->key ?? ''); ?>">
166 + <input type="hidden" name="mail_id" value="<?php echo esc_attr($data['mail_id']); ?>">
167 + <input type="hidden" name="displayed_checked_lists" id="displayed_checked_lists">
168 + </form>
169 + </div>
170 + </div>
171 +</div>
172 +
173 +<style>
174 + #acym__unsub__all:hover{
175 + background-color: <?php echo esc_html($data['hoverColor']); ?> !important;
176 + border-color: <?php echo esc_html($data['hoverColor']); ?> !important;
177 + }
178 +
179 + #acym__save:hover{
180 + background-color: <?php echo esc_html($data['hoverColor']); ?> !important;
181 + border-color: <?php echo esc_html($data['hoverColor']); ?> !important;
182 + }
183 +
184 + .switch input:checked ~ .switch-paddle{
185 + background-color: <?php echo esc_html($data['unsubscribeColor']); ?> !important;
186 + border-color: <?php echo esc_html($data['unsubscribeColor']); ?> !important;
187 + }
188 +
189 + .acym__unsub__reason__selected{
190 + border-color: <?php echo esc_html($data['unsubscribeColor']); ?> !important;
191 + }
192 +
193 + .button-primary{
194 + background-color: <?php echo esc_html($data['unsubscribeColor']); ?> !important;
195 + border-color: <?php echo esc_html($data['unsubscribeColor']); ?> !important;
196 + }
197 +
198 + .button-primary:hover{
199 + background-color: <?php echo esc_html($data['hoverColor']); ?> !important;
200 + border-color: <?php echo esc_html($data['hoverColor']); ?> !important;
201 + }
202 +
203 + .button-secondary{
204 + border-color: <?php echo esc_html($data['unsubscribeColor']); ?> !important;
205 + color: <?php echo esc_html($data['unsubscribeColor']); ?> !important;
206 + }
207 +
208 + .button-secondary:hover{
209 + border-color: <?php echo esc_html($data['hoverColor']); ?> !important;
210 + }
211 +</style>
212 +
213 +<?php if ('wordpress' === ACYM_CMS) exit; ?>