PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.5
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.5
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 / Partial / editor / settings.php

settings.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.5, at back/Partial/editor/settings.php

346 lines 17.3 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 id="acym__wysid__right__toolbar__settings" style="display: none;" class="cell grid-padding-x acym__wysid__right__toolbar--menu">
6 <p class="acym__wysid__right__toolbar__p__open acym__wysid__right__toolbar__p acym__title">
7 <?php echo esc_html(acym_translation('ACYM_TEMPLATE_DESIGN')); ?><i class="acymicon-keyboard-arrow-up"></i>
8 </p>
9 <div class="grid-y acym__wysid__right__toolbar__design--show acym__wysid__context__modal__container">
10 <div class="grid-x margin-bottom-1 small-12 cell">
11 <label for="acym__wysid__background-colorpicker" class="cell large-6 small-9" for="acym__wysid__background-colorpicker">
12 <?php echo esc_html(acym_translation('ACYM_BACKGROUND_COLOR')); ?>
13 </label>
14 <i class="acymicon-insert-photo small-1 acym_vcenter text-center cell acym__color__light-blue cursor-pointer" id="acym__wysid__background-image__template"></i>
15 <i class="acymicon-close acym_vcenter acym__color__red" id="acym__wysid__background-image__template-delete"></i>
16 <div class="small-2 text-center cell" style="margin:auto 0;">
17 <input type="text" id="acym__wysid__background-colorpicker" class="cell medium-shrink small-4" />
18 </div>
19 </div>
20 <div class="grid-x margin-bottom-1 small-12 cell">
21 <label class="middle large-6 cell" for="acym__wysid__background-size"><?php echo esc_html(acym_translation('ACYM_BACKGROUND_SIZE')); ?></label>
22 <div class="cell large-6">
23 <?php
24 $backgroundSize = [
25 'ACYM_DEFAULT' => [
26 'cover' => acym_translation('ACYM_BG_COVER'),
27 'auto' => acym_translation('ACYM_AUTO'),
28 'contain' => acym_translation('ACYM_BG_CONTAIN'),
29 ],
30 'ACYM_CUSTOM' => [
31 '10%' => '10%',
32 '15%' => '15%',
33 '20%' => '20%',
34 '25%' => '25%',
35 '30%' => '30%',
36 '35%' => '35%',
37 '40%' => '40%',
38 '45%' => '45%',
39 '50%' => '50%',
40 '55%' => '55%',
41 '60%' => '60%',
42 '65%' => '65%',
43 '70%' => '70%',
44 '75%' => '75%',
45 '80%' => '80%',
46 '85%' => '85%',
47 '90%' => '90%',
48 '95%' => '95%',
49 '100%' => '100%',
50 ],
51 ];
52
53 $defaultBackgroundSize = 'cover';
54
55 if (!empty($data['mail']->settings)) {
56 if (!is_array($data['mail']->settings)) $data['mail']->settings = json_decode($data['mail']->settings, true);
57
58 if (!empty($data['mail']->settings['default']['background-size'])) $defaultSize = $data['mail']->settings['default']['background-size'];
59 }
60
61 echo '<select name="acym__wysid__background-size" id="acym__wysid__background-size" class="acym__select">';
62
63 foreach ($backgroundSize as $groupName => $values) {
64 echo '<optgroup label="'.esc_attr(acym_translation($groupName)).'">';
65 foreach ($values as $value => $label) {
66 $selected = ($defaultBackgroundSize === $value) ? 'selected' : '';
67 echo '<option value="'.esc_attr($value).'" '.esc_attr($selected).'>'.esc_html($label).'</option>';
68 }
69 echo '</optgroup>';
70 }
71
72 echo '</select>';
73 ?>
74 </div>
75 </div>
76 <div class="grid-x margin-bottom-1 small-12 cell">
77 <label class="middle large-6 cell" for="acym__wysid__background-repeat"><?php echo esc_html(acym_translation('ACYM_BACKGROUND_REPEAT')); ?></label>
78 <div class="cell large-6">
79 <?php
80 $repeat = [
81 'no-repeat' => acym_translation('ACYM_DISABLE'),
82 'repeat' => acym_translation('ACYM_ENABLE'),
83 ];
84
85 $defaultRepeat = 'no-repeat';
86
87 if (!empty($data['mail']->settings)) {
88 if (!is_array($data['mail']->settings)) $data['mail']->settings = json_decode($data['mail']->settings, true);
89
90 if (!empty($data['mail']->settings['default']['background-repeat'])) $defaultSize = $data['mail']->settings['default']['background-repeat'];
91 }
92
93 acym_select(
94 $repeat,
95 'acym__wysid__background-repeat',
96 $defaultRepeat,
97 ['class' => 'acym__select'],
98 'value',
99 'text',
100 null,
101 false,
102 true
103 );
104 ?>
105 </div>
106 </div>
107 <div class="grid-x margin-bottom-1 small-12 cell">
108 <label class="middle large-6 cell" for="acym__wysid__background-position"><?php echo esc_html(acym_translation('ACYM_BACKGROUND_POSITION')); ?></label>
109 <div class="cell large-6">
110 <?php
111 $position = [
112 'top' => acym_translation('ACYM_POSITION_TOP'),
113 'center' => acym_translation('ACYM_CENTER'),
114 'bottom' => acym_translation('ACYM_POSITION_BOTTOM'),
115 'left' => acym_translation('ACYM_LEFT'),
116 'right' => acym_translation('ACYM_RIGHT'),
117 ];
118
119 $defaultPosition = 'top';
120
121 if (!empty($data['mail']->settings)) {
122 if (!is_array($data['mail']->settings)) $data['mail']->settings = json_decode($data['mail']->settings, true);
123
124 if (!empty($data['mail']->settings['default']['background-position'])) $defaultPosition = $data['mail']->settings['default']['background-position'];
125 }
126
127 acym_select(
128 $position,
129 'acym__wysid__background-position',
130 $defaultPosition,
131 ['class' => 'acym__select'],
132 'value',
133 'text',
134 null,
135 false,
136 true
137 );
138 ?>
139 </div>
140 </div>
141 <div class="grid-x margin-bottom-1 small-12 cell">
142 <label for="acym__wysid__maincolor-colorpicker1" class="cell large-6 small-9" for="acym__wysid__maincolor-colorpicker1">
143 <?php echo esc_html(acym_translation('ACYM_MAIN_COLORS'));
144 acym_info(['textShownInTooltip' => 'ACYM_MAIN_COLORS_DESC']); ?>
145 </label>
146 <div class="small-1 cell" style="margin:auto 0;">
147 <input type="text" id="acym__wysid__maincolor-colorpicker1" class="cell medium-shrink small-4" />
148 </div>
149 <div class="small-1 cell" style="margin:auto 0;">
150 <input type="text" id="acym__wysid__maincolor-colorpicker2" class="cell medium-shrink small-4" />
151 </div>
152 <div class="small-1 cell" style="margin:auto 0;">
153 <input type="text" id="acym__wysid__maincolor-colorpicker3" class="cell medium-shrink small-4" />
154 </div>
155 </div>
156 <div class="grid-x margin-bottom-1 small-12 cell">
157 <label class="middle large-6 cell" for="acym__wysid__padding__top__content"><?php echo esc_html(acym_translation('ACYM_MARGIN_TOP_CONTENT')); ?></label>
158 <div class="cell large-6">
159 <input type="number" min="0" value="20" id="acym__wysid__padding__top__content" class="cell small-4">
160 </div>
161 </div>
162 <div class="grid-x margin-bottom-1 small-12 cell">
163 <label class="middle large-6 cell" for="acym__wysid__padding__bottom__content"><?php echo esc_html(acym_translation('ACYM_MARGIN_BOTTOM_CONTENT')); ?></label>
164 <div class="cell large-6">
165 <input type="number" min="0" value="20" id="acym__wysid__padding__bottom__content" class="cell small-4">
166 </div>
167 </div>
168 <div class="grid-x margin-bottom-1 small-12 cell">
169 <label class="middle large-6 cell" for="default_font"><?php echo esc_html(acym_translation('ACYM_DEFAULT_FONT')); ?></label>
170 <div class="cell large-6">
171 <?php
172 $fonts = [
173 'Andale Mono' => 'Andale Mono',
174 'Arial' => 'Arial',
175 'Book Antiqua' => 'Book Antiqua',
176 'Comic Sans MS' => 'Comic Sans MS',
177 'Courier New' => 'Courier New',
178 'Georgia' => 'Georgia',
179 'Helvetica' => 'Helvetica',
180 'Impact' => 'Impact',
181 'Times New Roman' => 'Times New Roman',
182 'Trebuchet MS' => 'Trebuchet MS',
183 'Verdana' => 'Verdana',
184 ];
185
186 $defaultFont = 'Helvetica';
187
188 if (!empty($data['mail']->settings)) {
189 if (!is_array($data['mail']->settings)) $data['mail']->settings = json_decode($data['mail']->settings, true);
190
191 if (!empty($data['mail']->settings['default']['font-family'])) $defaultFont = $data['mail']->settings['default']['font-family'];
192 }
193
194 acym_select(
195 $fonts,
196 'default_font',
197 $defaultFont,
198 ['class' => 'acym__select'],
199 'value',
200 'text',
201 null,
202 false,
203 true
204 );
205 ?>
206 </div>
207
208 </div>
209 </div>
210 <p class="acym__wysid__right__toolbar__p__open acym__wysid__right__toolbar__p acym__title">
211 <?php echo esc_html(acym_translation('ACYM_DESIGN')); ?>
212 <i class="acymicon-keyboard-arrow-up"></i>
213 <?php acym_info(['textShownInTooltip' => 'ACYM_INTRO_CUSTOMIZE_FONT']); ?>
214 </p>
215 <div class="grid-y acym__wysid__right__toolbar__design--show acym__wysid__right__toolbar__design acym__wysid__context__modal__container">
216 <div class="grid-x margin-bottom-1 small-12 cell">
217 <label class="middle large-6 cell" for="acym__wysid__right__toolbar__settings__font--select"><?php echo esc_html(acym_translation('ACYM_HTML_TAG')); ?></label>
218 <div class="cell large-6">
219 <select id="acym__wysid__right__toolbar__settings__font--select" class="small-8 large-4 cell acym__select">
220 <option value="p">p - <?php echo esc_html(acym_translation('ACYM_PARAGRAPH')); ?></option>
221 <option value="a">a - <?php echo esc_html(acym_translation('ACYM_LINKS')); ?></option>
222 <option value="span.acym_link"><?php echo esc_html(acym_translation('ACYM_DYNAMIC_TEXTS_LINKS')); ?></option>
223 <option value="li">li - <?php echo esc_html(acym_translation('ACYM_BULLET_LIST')); ?></option>
224 <option value="h1">h1</option>
225 <option value="h2">h2</option>
226 <option value="h3">h3</option>
227 <option value="h4">h4</option>
228 <option value="h5">h5</option>
229 <option value="h6">h6</option>
230 </select>
231 </div>
232 </div>
233 <div class="grid-x margin-bottom-1 small-12 cell">
234 <label class="middle large-6 cell" for="acym__wysid__right__toolbar__settings__font-family"><?php echo esc_html(acym_translation('ACYM_FAMILY')); ?></label>
235 <div class="cell large-6">
236 <select id="acym__wysid__right__toolbar__settings__font-family" class="auto cell acym__select">
237 <option style="font-family: 'Andale Mono'">Andale Mono</option>
238 <option style="font-family: 'Arial'">Arial</option>
239 <option style="font-family: 'Book Antiqua'">Book Antiqua</option>
240 <option style="font-family: 'Comic Sans MS'">Comic Sans MS</option>
241 <option style="font-family: 'Courier New'">Courier New</option>
242 <option style="font-family: 'Georgia'">Georgia</option>
243 <option style="font-family: 'Helvetica'">Helvetica</option>
244 <option style="font-family: 'Impact'">Impact</option>
245 <option style="font-family: 'Times New Roman'">Times New Roman</option>
246 <option style="font-family: 'Trebuchet MS'">Trebuchet MS</option>
247 <option style="font-family: 'Verdana'">Verdana</option>
248 </select>
249 </div>
250 </div>
251 <div class="grid-x margin-bottom-1 small-12 cell">
252 <label class="middle large-6 cell" for="acym__wysid__right__toolbar__settings__line-height"><?php echo esc_html(acym_translation('ACYM_LINE_HEIGHT')); ?></label>
253 <div class="cell large-6">
254 <select id="acym__wysid__right__toolbar__settings__line-height" class="auto cell acym__select">
255 <option value="inherit"><?php echo esc_html(acym_translation('ACYM_DEFAULT')); ?></option>
256 <option value="100%">100%</option>
257 <option value="110%">110%</option>
258 <option value="120%">120%</option>
259 <option value="130%">130%</option>
260 <option value="140%">140%</option>
261 <option value="150%">150%</option>
262 <option value="160%">160%</option>
263 <option value="170%">170%</option>
264 <option value="180%">180%</option>
265 <option value="190%">190%</option>
266 <option value="200%">200%</option>
267 <option value="210%">210%</option>
268 <option value="220%">220%</option>
269 <option value="230%">230%</option>
270 <option value="240%">240%</option>
271 </select>
272 </div>
273 </div>
274 <div class="grid-x margin-bottom-1 small-12 cell">
275 <label class="middle large-6 cell" for="acym__wysid__right__toolbar__settings__font-size"><?php echo esc_html(acym_translation('ACYM_SIZE')); ?></label>
276 <div class="cell large-6">
277 <select id="acym__wysid__right__toolbar__settings__font-size" class="auto cell acym__select">
278 <option>10px</option>
279 <option>12px</option>
280 <option>14px</option>
281 <option>16px</option>
282 <option>18px</option>
283 <option>20px</option>
284 <option>22px</option>
285 <option>24px</option>
286 <option>26px</option>
287 <option>28px</option>
288 <option>30px</option>
289 <option>32px</option>
290 <option>34px</option>
291 <option>36px</option>
292 </select>
293 </div>
294 </div>
295 <div class="grid-x margin-bottom-1 small-12 cell">
296 <label class="middle large-6 cell"><?php echo esc_html(acym_translation('ACYM_STYLE')); ?></label>
297 <i id="acym__wysid__right__toolbar__settings__bold" class="acymicon-format-bold text-center small-3 large-auto cell" style="line-height: 39px"></i>
298 <i id="acym__wysid__right__toolbar__settings__italic" class="acymicon-format-italic text-center small-3 large-auto cell" style="line-height: 39px"></i>
299 <div class="small-2 text-center cell" style="margin:auto"><input type="text" id="acym__wysid__right__toolbar__settings__color" style="display: none;"></div>
300 </div>
301 <div class="grid-x margin-bottom-1 small-12 cell">
302 <div class="cell hide-for-small-only medium-3"></div>
303 <?php
304 $dataStyleSheet = '<div class="grid-x acym__wysid__right__toolbar__settings__stylesheet">
305 <h6 class="acym__title acym__title__secondary cell text-center margin-top-1">'.acym_translation('ACYM_HERE_PASTE_YOUR_STYLESHEET').'</h6>
306 <textarea id="acym__wysid__right__toolbar__settings__stylesheet__textarea" class="margin-top-1 margin-bottom-1" rows="15"></textarea>
307 <button type="button" id="acym__wysid__right__toolbar__settings__stylesheet__cancel" class="button cell medium-4">'.acym_translation('ACYM_CANCEL').'</button>
308 <div class="medium-4 cell"></div>
309 <button type="button" id="acym__wysid__right__toolbar__settings__stylesheet__apply" class="button cell medium-4">'.acym_translation('ACYM_LOAD_STYLESHEET').'</button>
310 </div>';
311 acym_modal(
312 acym_translation('ACYM_CUSTOM_ADD_STYLESHEET'),
313 $dataStyleSheet,
314 'acym__wysid__right__toolbar__settings__stylesheet__modal',
315 [],
316 [
317 'class' => 'button cell medium-6 margin-top-2',
318 'id' => 'acym__wysid__right__toolbar__settings__stylesheet__open',
319 ]
320 ); ?>
321 </div>
322 </div>
323 <p class="acym__wysid__right__toolbar__p__open acym__wysid__right__toolbar__p acym__title">
324 <?php echo esc_html(acym_translation('ACYM_CUSTOM_SOCIAL_ICONS')); ?><i class="acymicon-keyboard-arrow-up"></i></p>
325 <div class="grid-y acym__wysid__right__toolbar__design--show acym__wysid__right__toolbar__design acym__wysid__right__toolbar__design__social__icons acym__wysid__context__modal__container">
326 <?php
327 $config = acym_config();
328 $socialIcons = json_decode($config->get('social_icons', '{}'), true);
329 foreach ($socialIcons as $social => $iconUrl) {
330 echo '<div class="cell grid-x margin-bottom-2 acym_vcenter acym__wysid__right__toolbar__design__social__icons__one">
331 <img class="cell shrink" src="'.esc_attr($iconUrl).'" alt="icon '.esc_attr($social).'">
332 <input type="file" name="icon_'.esc_attr($social).'" class="auto cell" accept="image/png, image/jpeg">
333 <div class="auto cell grid-x text-center align-center acym_vcenter"><span class="shrink cell acym__wysid__social__icons__import__text">'.esc_html(
334 acym_translation(
335 'ACYM_SELECT_NEW_ICON'
336 )
337 ).'</span></div>
338 <button disabled type="button" class="button cell shrink acym__wysid__social__icons__import">'.esc_html(
339 acym_translation('ACYM_IMPORT')
340 ).'</button>
341 </div>';
342 }
343 ?>
344 </div>
345 </div>
346