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/Frontmails/tmpl/edit.php +122 -0 10.2.0 → 11.1.0 View file →
@@ -1,0 +1,122 @@
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 id="acym__editor__content" class="grid-x acym__content acym__editor__area <?php echo !empty($data['menuClass']) ? esc_attr($data['menuClass']) : ''; ?>">
6 + <div class="cell grid-x grid-margin-x align-right margin-bottom-1">
7 + <input type="hidden" id="acym__mail__edit__editor" value="<?php echo esc_attr($data['mail']->editor); ?>">
8 + <input type="hidden"
9 + class="acym__wysid__hidden__save__thumbnail"
10 + id="editor_thumbnail"
11 + name="editor_thumbnail"
12 + value="<?php echo esc_attr($data['mail']->thumbnail); ?>" />
13 + <input type="hidden" id="acym__mail__edit__editor__social__icons" value="<?php echo empty($data['social_icons']) ? '{}' : esc_attr($data['social_icons']); ?>">
14 + <input type="hidden"
15 + id="acym__mail__type"
16 + name="mail[type]"
17 + value="<?php echo empty($data['mail']->type) ? esc_attr($data['mailClass']::TYPE_STANDARD) : esc_attr($data['mail']->type); ?>">
18 + <input type="hidden" name="list_ids" value="<?php echo empty($data['list_id'][0]) ? 0 : esc_attr($data['list_id'][0]); ?>">
19 + <?php
20 + include acym_getView('mails', 'edit_actions', true);
21 + ?>
22 +
23 + </div>
24 + <div class="cell grid-x grid-padding-x acym__editor__content__options">
25 + <?php
26 + echo !empty($data['return']) ? '<input type="hidden" name="return" value="'.esc_attr($data['return']).'"/>' : '';
27 + echo !empty($data['fromId']) ? '<input type="hidden" name="fromId" value="'.esc_attr($data['fromId']).'"/>' : '';
28 + ?>
29 + <div class="cell medium-auto">
30 + <label>
31 + <?php echo esc_html(acym_translation('ACYM_NAME')); ?>
32 + <input name="mail[name]" type="text" class="acy_required_field" value="<?php echo esc_attr($data['mail']->name); ?>" required>
33 + </label>
34 + </div>
35 + <div class="cell medium-auto">
36 + <label>
37 + <?php echo esc_html(acym_translation('ACYM_EMAIL_SUBJECT')); ?>
38 + <input name="mail[subject]" type="text" value="<?php echo esc_attr($data['mail']->subject); ?>" <?php echo in_array(
39 + $data['mail']->type,
40 + [$data['mailClass']::TYPE_WELCOME, $data['mailClass']::TYPE_UNSUBSCRIBE, $data['mailClass']::TYPE_AUTOMATION]
41 + ) ? 'required' : ''; ?>>
42 + </label>
43 + </div>
44 + <?php if (!empty($data['lists'])) { ?>
45 + <div class="cell medium-auto">
46 + <label>
47 + <?php
48 + echo esc_html(acym_translation('ACYM_SELECT_ONE_OR_MORE_LIST'));
49 + acym_selectMultiple($data['lists'], 'list_ids', empty($data['list_id']) ? [] : $data['list_id'], ['class' => 'acym__select'], 'value', 'text', true);
50 + ?>
51 + </label>
52 + </div>
53 + <?php } ?>
54 + <div class="cell grid-x acym__toggle__arrow">
55 + <p class="cell medium-shrink acym__toggle__arrow__trigger">
56 + <?php echo esc_html(acym_translation('ACYM_ADVANCED_OPTIONS')); ?> <i class="acymicon-keyboard-arrow-down"></i>
57 + </p>
58 + <div class="cell acym__toggle__arrow__contain">
59 + <div class="grid-x grid-padding-x">
60 + <?php if (empty($data['multilingual']) && empty($data['abtest'])) { ?>
61 + <div class="cell grid-x">
62 + <div class="cell medium-shrink">
63 + <label for="acym__mail__edit__preheader">
64 + <?php
65 + echo esc_html(acym_translation('ACYM_EMAIL_PREHEADER'));
66 + acym_info(['textShownInTooltip' => 'ACYM_EMAIL_PREHEADER_DESC']);
67 + ?>
68 + </label>
69 + </div>
70 + <input id="acym__mail__edit__preheader"
71 + name="mail[preheader]"
72 + type="text"
73 + maxlength="255"
74 + value="<?php echo esc_attr($data['mail']->preheader); ?>">
75 + </div>
76 + <?php } ?>
77 + <div class="cell grid-x medium-6" id="acym__mail__edit__html__stylesheet__container">
78 + <div class="cell medium-shrink">
79 + <label for="acym__mail__edit__html__stylesheet">
80 + <?php
81 + acym_tooltip(
82 + [
83 + 'hoveredText' => acym_translation('ACYM_CUSTOM_ADD_STYLESHEET'),
84 + 'textShownInTooltip' => acym_translation('ACYM_STYLESHEET_HTML_DESC'),
85 + ]
86 + );
87 + $stylesheet = empty($data['mail']->stylesheet) ? '' : $data['mail']->stylesheet;
88 + ?>
89 + </label>
90 + </div>
91 + <textarea
92 + name="editor_stylesheet"
93 + id="acym__mail__edit__html__stylesheet"
94 + cols="30"
95 + rows="15"
96 + type="text"><?php echo esc_html($stylesheet); ?></textarea>
97 + </div>
98 + <div class="cell medium-auto">
99 + <label for="acym__mail__edit__custom__header"><?php echo esc_html(acym_translation('ACYM_CUSTOM_HEADERS')); ?></label>
100 + <textarea id="acym__mail__edit__custom__header" name="editor_headers" cols="30" rows="15" type="text">
101 + <?php echo esc_html($data['mail']->headers); ?>
102 + </textarea>
103 + </div>
104 + </div>
105 + </div>
106 + </div>
107 + </div>
108 + </div>
109 + <input type="hidden" name="mail[id]" value="<?php echo esc_attr($data['mail']->id); ?>" />
110 + <input type="hidden" name="id" value="<?php echo esc_attr($data['mail']->id); ?>" />
111 + <input type="hidden" name="thumbnail" value="<?php echo empty($data['mail']->thumbnail) ? '' : esc_attr($data['mail']->thumbnail); ?>" />
112 +<?php
113 +acym_formOptions();
114 +
115 +$data['editor']->content = $data['mail']->body;
116 +$data['editor']->autoSave = !empty($data['mail']->autosave) ? $data['mail']->autosave : '';
117 +if (!empty($data['mail']->editor)) $data['editor']->editor = $data['mail']->editor;
118 +if (!empty($data['mail']->id)) $data['editor']->mailId = $data['mail']->id;
119 +if (!empty($data['mail']->type)) $data['editor']->automation = $data['isAutomationAdmin'];
120 +if (!empty($data['mail']->settings)) $data['editor']->settings = $data['mail']->settings;
121 +if (!empty($data['mail']->stylesheet)) $data['editor']->stylesheet = $data['mail']->stylesheet;
122 +$data['editor']->display();