PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.4
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.4
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 / back / Views / Configuration / tmpl / mail.php

mail.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.4, at back/Views/Configuration/tmpl/mail.php

444 lines 19.4 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 <input type="hidden" id="acym__config__mail__embed__image__blocked" value="<?php echo esc_attr(json_encode($data['embedImage'])); ?>">
6 <input type="hidden" id="acym__config__mail__embed__attachment__blocked" value="<?php echo esc_attr(json_encode($data['embedAttachment'])); ?>">
7 <div class="acym__content acym_area padding-vertical-1 padding-horizontal-2">
8 <div class="cell acym__config__mail-default">
9 <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_DEFAULT_SENDER')); ?></div>
10 <?php
11 if (!empty($data['translation_languages'])) {
12 acym_displayLanguageRadio(
13 $data['translation_languages'],
14 'config[sender_info_translation]',
15 $this->config->get('sender_info_translation', ''),
16 acym_translation('ACYM_LANGUAGE_SENDER_INFORMATION_DESC'),
17 '',
18 'configuration'
19 );
20 } ?>
21 <div class="grid-x grid-margin-x margin-y">
22 <div class="cell large-6 xlarge-4">
23 <label class="cell grid-x">
24 <span class="cell"><?php echo esc_html(acym_translation('ACYM_FROM_NAME'));
25 acym_info(['textShownInTooltip' => 'ACYM_FROM_DESC']); ?></span>
26 <input type="text"
27 name="config[from_name]"
28 placeholder="<?php echo esc_attr(acym_translation('ACYM_FROM_NAME_PLACEHOLDER')); ?>"
29 value="<?php echo esc_attr($this->config->get('from_name')); ?>" />
30 </label>
31 </div>
32 <div class="cell large-6 xlarge-4">
33 <label class="cell grid-x">
34 <span class="cell"><?php echo esc_html(acym_translation('ACYM_FROM_EMAIL'));
35 acym_info(['textShownInTooltip' => 'ACYM_FROM_DESC']); ?></span>
36 <input type="email"
37 name="config[from_email]"
38 placeholder="<?php echo esc_attr(acym_translation('ACYM_FROM_EMAIL_PLACEHOLDER')); ?>"
39 value="<?php echo esc_attr($this->config->get('from_email')); ?>" />
40 </label>
41 </div>
42 <?php
43 if (!empty($data['wp_mail_smtp_installed'])) {
44 $pluginClass = new AcymPlugin();
45 $pluginClass->getCopySettingsButton($data, 'from_options', 'wp_mail_smtp');
46 }
47 ?>
48 <div class="cell margin-bottom-1 acym_vcenter">
49 <input type="hidden" id="from_as_replyto_value" name="config[from_as_replyto]" value="<?php echo esc_attr($this->config->get('from_as_replyto', 1)); ?>" />
50 <input id="from_as_replyto" data-toggle="acy_toggle_replyto" data-value="from_as_replyto_value" class="acym_toggle" type="checkbox" <?php
51 acym_checked($this->config->get('from_as_replyto', 1) == 1);
52 ?>/>
53 <label for="from_as_replyto">
54 <?php echo esc_html(acym_translation('ACYM_FROM_AS_REPLYTO')); ?>
55 </label>
56 </div>
57
58 <div class="cell large-6 xlarge-4 acy_toggle_replyto">
59 <label class="cell grid-x">
60 <span class="cell"><?php echo esc_html(acym_translation('ACYM_REPLYTO_NAME'));
61 acym_info(['textShownInTooltip' => 'ACYM_REPLYTO_DESC']); ?></span>
62 <input type="text"
63 name="config[replyto_name]"
64 placeholder="<?php echo esc_attr(acym_translation('ACYM_REPLYTO_NAME_PLACEHOLDER')); ?>"
65 value="<?php echo esc_attr($this->config->get('replyto_name')); ?>" />
66 </label>
67 </div>
68 <div class="cell large-6 xlarge-4 acy_toggle_replyto">
69 <label class="cell grid-x">
70 <span class="cell"><?php echo esc_html(acym_translation('ACYM_REPLYTO_EMAIL'));
71 acym_info(['textShownInTooltip' => 'ACYM_REPLYTO_DESC']); ?></span>
72 <input type="email"
73 name="config[replyto_email]"
74 placeholder="<?php echo esc_attr(acym_translation('ACYM_REPLYTO_EMAIL_PLACEHOLDER')); ?>"
75 value="<?php echo esc_attr($this->config->get('replyto_email')); ?>" />
76 </label>
77 </div>
78
79 <div class="cell grid-x">
80 <div class="cell medium-6 large-4 xlarge-3 grid-x">
81 <?php
82 acym_switch([
83 'name' => 'config[add_names]',
84 'value' => $this->config->get('add_names'),
85 'label' => acym_translation('ACYM_ADD_NAMES'),
86 'tip' => ['textShownInTooltip' => 'ACYM_ADD_NAMES_DESC'],
87 ]); ?>
88 </div>
89 </div>
90
91 <div class="cell grid-x">
92 <label class="cell large-6 xlarge-4 grid-x">
93 <span class="cell"><?php echo esc_html(acym_translation('ACYM_BOUNCE_EMAIL'));
94 acym_info(['textShownInTooltip' => 'ACYM_BOUNCE_ADDRESS_DESC']); ?></span>
95 <input type="text"
96 name="config[bounce_email]"
97 placeholder="<?php echo esc_attr(acym_translation('ACYM_BOUNCE_EMAIL_PLACEHOLDER')); ?>"
98 value="<?php echo esc_attr($this->config->get('bounce_email')); ?>"
99 id="bounceAddress1" />
100 </label>
101 </div>
102 </div>
103 </div>
104
105 <div class="cell acym__configuration__mail-settings">
106 <div class="acym__title acym__title__secondary margin-top-3"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_MAIL'));
107 acym_info(
108 ['textShownInTooltip' => 'ACYM_INTRO_MAIL_SETTINGS']
109 ); ?></div>
110 <?php include acym_getPartial('configuration', 'sending_methods'); ?>
111 </div>
112 </div>
113
114 <div class="acym__content acym_area padding-vertical-1 padding-horizontal-2">
115 <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_EMAIL_EDITOR')); ?></div>
116 <div class="grid-x margin-y">
117 <div class="cell grid-x grid-margin-x">
118 <?php
119 acym_switch([
120 'name' => 'config[save_thumbnail]',
121 'value' => $this->config->get('save_thumbnail', 1),
122 'label' => acym_translation('ACYM_SAVE_TEMPLATE_THUMBNAIL'),
123 'tip' => ['textShownInTooltip' => 'ACYM_SAVE_TEMPLATE_THUMBNAIL_DESC'],
124 'labelClass' => 'xlarge-3 medium-5 small-9',
125 ]);
126 ?>
127 </div>
128 <?php if ($this->config->get('built_by_update', 0) == 1 || acym_level(ACYM_ESSENTIAL)) { ?>
129 <div class="cell grid-x grid-margin-x">
130 <?php
131 acym_switch([
132 'name' => 'config[display_built_by]',
133 'value' => $this->config->get('display_built_by', 0),
134 'label' => html_entity_decode(acym_translation('ACYM_ADD_BUILT_BY_FOOTER_UNSUB_PAGE')),
135 'labelClass' => 'xlarge-3 medium-5 small-9',
136 ]);
137 ?>
138 </div>
139 <?php } ?>
140 <div class="cell grid-x grid-margin-x">
141 <?php
142 acym_switch([
143 'name' => 'config[add_play_button_video]',
144 'value' => $this->config->get('add_play_button_video', 1),
145 'label' => acym_translation('ACYM_ADD_PLAY_BUTTON'),
146 'labelClass' => 'xlarge-3 medium-5 small-9',
147 ]);
148 ?>
149 </div>
150 <div class="cell grid-x">
151 <label class="cell medium-6 grid-x">
152 <span class="cell medium-6">
153 <?php echo esc_html(acym_translation('ACYM_UNSPLASH_ACCESS_KEY'));
154 acym_info(['textShownInTooltip' => 'ACYM_UNSPLASH_ACCESS_KEY_DESC']); ?>
155 </span>
156 <?php
157 $unsplashKey = $this->config->get('unsplash_key');
158 if (strlen($unsplashKey) > 5) {
159 $unsplashKey = str_repeat('*', 10).substr($unsplashKey, -5);
160 }
161 ?>
162 <input type="text"
163 name="config[unsplash_key]"
164 value="<?php echo esc_attr($unsplashKey); ?>"
165 class="cell medium-auto" />
166 </label>
167 </div>
168 <div class="cell grid-x">
169 <label class="cell medium-6 grid-x">
170 <span class="cell medium-6">
171 <?php echo esc_html(acym_translation('ACYM_GIPHY_API_KEY'));
172 acym_info(['textShownInTooltip' => 'ACYM_GIPHY_API_KEY_DESC']); ?>
173 </span>
174 <?php
175 $giphyKey = $this->config->get('giphy_key');
176 if (strlen($giphyKey) > 5) {
177 $giphyKey = str_repeat('*', 10).substr($giphyKey, -5);
178 }
179 ?>
180 <input type="text"
181 name="config[giphy_key]"
182 value="<?php echo esc_attr($giphyKey); ?>"
183 class="cell medium-auto" />
184 </label>
185 </div>
186 </div>
187 </div>
188
189 <div class="acym__content acym_area grid-x grid-margin-y padding-horizontal-2 acym__configuration__advanced">
190 <div class="cell grid-x acym__configuration__showmore-head">
191 <div class="acym__title acym__title__secondary cell auto margin-bottom-0">
192 <?php echo esc_html(acym_translation('ACYM_CONFIGURATION_ADVANCED')); ?>
193 </div>
194 <div class="cell shrink">
195 <?php acym_showMore('acym__configuration__mail__advanced__content'); ?>
196 </div>
197 </div>
198 <div id="acym__configuration__mail__advanced__content" style="display:none;">
199 <div class="grid-x grid-margin-x margin-y">
200 <div class="cell medium-6 grid-x">
201 <div class="cell large-6">
202 <label for="config_encoding"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_ENCODING')); ?></label>
203 </div>
204 <div class="cell large-6">
205 <?php
206 $encodingHelper = $data['encodingHelper'];
207 $encodingHelper->encodingField('config[encoding_format]', $this->config->get('encoding_format', '8bit'));
208 ?>
209 </div>
210 </div>
211
212 <div class="cell medium-6 grid-x">
213 <div class="cell large-6">
214 <label for="config_charset"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_CHARSET')); ?></label>
215 </div>
216 <div class="cell large-6">
217 <?php
218 $encodingHelper->charsetField(
219 'config[charset]',
220 $this->config->get('charset'),
221 ['class' => 'acym__select'],
222 true
223 );
224 ?>
225 </div>
226 </div>
227
228 <?php
229 $options = [
230 'special_chars' => [
231 'label' => 'ACYM_SPECIAL_CHARS',
232 ],
233 'multiple_part' => [
234 'label' => 'ACYM_CONFIGURATION_MULTIPART',
235 ],
236 'prevent_hyphens' => [
237 'label' => 'ACYM_PREVENT_HYPHENS',
238 ],
239 'embed_images' => [
240 'label' => 'ACYM_CONFIGURATION_EMBED_IMAGES',
241 'info_disabled' => 'ACYM_CONFIGURATION_OPTION_DESC_DISABLED',
242 ],
243 'embed_files' => [
244 'label' => 'ACYM_CONFIGURATION_EMBED_ATTACHMENTS',
245 'info_disabled' => 'ACYM_CONFIGURATION_OPTION_DESC_DISABLED',
246 ],
247 'archive_index' => [
248 'label' => 'ACYM_CONFIGURATION_INDEX_ARCHIVE',
249 ],
250 'send_website_emails' => [
251 'label' => 'ACYM_SEND_WEBSITE_EMAILS',
252 ],
253 ];
254
255 foreach ($options as $oneOption => $option) {
256 echo '<div class="cell medium-6 grid-x acym__configuration__mail__option">';
257 $label = $option['label'];
258
259 $info = empty($option['info_disabled']) ? '' : '<span class="acym__configuration__mail__info__disabled">'.acym_translation($option['info_disabled']).'</span> ';
260
261 $description = $label.'_DESC';
262 $translatedDescription = acym_translation($description);
263 if ($translatedDescription !== $description) {
264 $info .= $translatedDescription;
265 }
266
267 $default = empty($option['default']) ? 0 : $option['default'];
268
269 acym_switch([
270 'name' => 'config['.$oneOption.']',
271 'value' => $this->config->get($oneOption, $default),
272 'label' => acym_translation($label),
273 'tip' => empty($info) ? null : ['textShownInTooltip' => $info],
274 ]);
275
276 echo '</div>';
277 }
278 ?>
279 <div class="cell medium-6 grid-x" id="attachments_position" <?php echo $this->config->get('embed_files', 0) ? 'style="display:none;"' : ''; ?>>
280 <div class="cell large-6">
281 <?php
282 echo esc_html(acym_translation('ACYM_CONFIGURATION_ATTACHMENTS_POSITION'));
283 acym_info(
284 ['textShownInTooltip' => 'ACYM_CONFIGURATION_ATTACHMENTS_POSITION_DESC']
285 );
286 ?>
287 </div>
288 <div class="cell large-6">
289 <?php
290 acym_select(
291 [
292 'top' => acym_translation('ACYM_TOP_OF_EMAIL_CONTENT'),
293 'bottom' => acym_translation('ACYM_BOTTOM_OF_EMAIL_CONTENT'),
294 ],
295 'config[attachments_position]',
296 $this->config->get('attachments_position', 'bottom'),
297 ['class' => 'acym__select'],
298 'value',
299 'text',
300 null,
301 false,
302 true
303 );
304 ?>
305 </div>
306 </div>
307 <div class="cell medium-6 grid-x">
308 <label class="cell grid-x">
309 <span class="cell medium-6">
310 <?php echo esc_html(acym_translation('ACYM_MAIL_MAX_LINE_LENGTH'));
311 acym_info(['textShownInTooltip' => 'ACYM_MAIL_MAX_LINE_LENGTH_DESC']); ?>
312 </span>
313 <input type="number"
314 name="config[mailer_wordwrap]"
315 value="<?php echo esc_attr($this->config->get('mailer_wordwrap', 0)); ?>"
316 min="0"
317 max="998"
318 class="cell medium-auto" />
319 </label>
320 </div>
321 <div class="cell medium-6 grid-x">
322 <?php
323 acym_switch([
324 'name' => 'config[dkim]',
325 'value' => $this->config->get('dkim'),
326 'label' => acym_translation('ACYM_CONFIGURATION_DKIM'),
327 'tip' => ['textShownInTooltip' => 'ACYM_INTRO_DKIM'],
328 'toggle' => 'dkim_config',
329 ]); ?>
330 </div>
331 </div>
332
333
334 <div class="cell acym__configuration__dkim padding-vertical-1 margin-y" id="dkim_config">
335 <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_DKIM_SETTINGS')); ?></div>
336 <?php
337 $domain = $this->config->get('dkim_domain', '');
338 if (empty($domain)) {
339 $domain = preg_replace(['#^https?://(www\.)*#i', '#^www\.#'], '', ACYM_LIVE);
340 //we load the first part of the domain, until we get a / (yes, there is always a / at the end as the ACYM_LIVE adds one)
341 $domain = substr($domain, 0, strpos($domain, '/'));
342 }
343
344 $dkimSelector = $this->config->get('dkim_selector', 'acy');
345 if ((!empty($dkimSelector) && $dkimSelector != 'acy') || $this->config->get('dkim_passphrase', '') != '' || acym_getVar('int', 'dkimletme')) {
346 ?>
347 <div class="grid-x grid-margin-x">
348 <div class="cell large-6 grid-x grid-margin-x margin-y">
349 <label for="dkim_domain_name" class="cell large-2 medium-3">
350 <?php echo esc_html(acym_translation('ACYM_DKIM_DOMAIN')); ?>
351 </label>
352 <div class="cell large-10 medium-9">
353 <input id="dkim_domain_name" type="text" name="config[dkim_domain]" value="<?php echo esc_attr($domain); ?>">
354 </div>
355
356 <label for="dkim_selector" class="cell large-2 medium-3">
357 <?php echo esc_html(acym_translation('ACYM_DKIM_SELECTOR')); ?>
358 </label>
359 <div class="cell large-10 medium-9">
360 <input id="dkim_selector" type="text" name="config[dkim_selector]" value="<?php echo esc_attr($this->config->get('dkim_selector', 'acy')); ?>">
361 </div>
362
363 <label for="dkim_private" class="cell large-2 medium-3">
364 <?php echo esc_html(acym_translation('ACYM_DKIM_PRIVATE')); ?>
365 </label>
366 <div class="cell large-10 medium-9">
367 <textarea id="dkim_private" name="config[dkim_private]"><?php echo esc_html($this->config->get('dkim_private', '')); ?></textarea>
368 </div>
369 </div>
370
371 <div class="cell large-6 grid-x grid-margin-x margin-y">
372 <label for="dkim_passphrase" class="cell large-2 medium-3">
373 <?php echo esc_html(acym_translation('ACYM_DKIM_PASSPHRASE')); ?>
374 </label>
375 <div class="cell large-10 medium-9">
376 <input id="dkim_passphrase"
377 type="text"
378 name="config[dkim_passphrase]"
379 value="<?php echo esc_attr($this->config->get('dkim_passphrase', '')); ?>">
380 </div>
381
382 <label for="dkim_identity" class="cell large-2 medium-3">
383 <?php echo esc_html(acym_translation('ACYM_DKIM_IDENTITY')); ?>
384 </label>
385 <div class="cell large-10 medium-9">
386 <input id="dkim_identity" type="text" name="config[dkim_identity]" value="<?php echo esc_attr($this->config->get('dkim_identity', '')); ?>">
387 </div>
388
389 <label for="dkim_public" class="cell large-2 medium-3">
390 <?php echo esc_html(acym_translation('ACYM_DKIM_PUBLIC')); ?>
391 </label>
392 <div class="cell large-10 medium-9">
393 <textarea id="dkim_public" name="config[dkim_public]"><?php echo esc_html($this->config->get('dkim_public', '')); ?></textarea>
394 </div>
395 </div>
396 </div>
397 <?php
398 } else {
399 //Be compatible with what we used to have:
400 $publicKey = 'v=DKIM1;s=email;t=s;p='.trim($this->config->get('dkim_public', ''), '"');
401
402 echo wp_kses(
403 acym_translationSprintf(
404 'ACYM_DKIM_CONFIGURE',
405 '<input class="margin-bottom-0" type="text" id="dkim_domain" name="config[dkim_domain]" value="'.esc_attr($domain).'" />'
406 ),
407 [
408 'input' => [
409 'class' => true,
410 'type' => true,
411 'id' => true,
412 'name' => true,
413 'value' => true,
414 ],
415 ]
416 );
417 ?>
418 <div class="cell">
419 <?php echo esc_html(acym_translation('ACYM_DKIM_KEY')); ?>
420 <input id="dkim_key" class="acym_autoselect margin-bottom-0" type="text" readonly="readonly" value="acy._domainkey" />
421 </div>
422 <div class="cell">
423 <?php echo esc_html(acym_translation('ACYM_DKIM_VALUE')); ?>
424 <input id="dkim_value" class="acym_autoselect margin-bottom-0" type="text" readonly="readonly" value="<?php echo esc_attr($publicKey); ?>" />
425 </div>
426 <div class="cell">
427 <input type="checkbox" value="1" id="dkimletme" name="dkimletme" />
428 <label for="dkimletme"><?php echo esc_html(acym_translation('ACYM_DKIM_LET_ME')); ?></label>
429 </div>
430 <?php
431 }
432 ?>
433
434 <div class="cell">
435 <a class="button button-secondary margin-bottom-0 margin-top-1"
436 target="_blank"
437 href="<?php echo esc_url(ACYM_DOCUMENTATION); ?>setup/configuration/mail-configuration/dkim">
438 <?php echo esc_html(acym_translation('ACYM_HELP')); ?>
439 </a>
440 </div>
441 </div>
442 </div>
443 </div>
444