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 | back/Partial/configuration/sending_methods.php +27 -21 10.2.2 → 11.1.0 View file →
@@ -1,4 +1,8 @@
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 +?>
1 5 <div class="cell grid-x acym__sending__methods__choose acym__selection">
2 6 <?php
3 7 $services = $data['sendingMethods'];
4 8 uksort($services, function ($first, $next) {
@@ -9,9 +13,9 @@
9 13 });
10 14 ?>
11 15 <?php if (empty($data['isSml'])) { ?>
12 16 <div class="acym__title acym__title__secondary margin-top-1 medium-12 <?php echo !empty($data['step']) && $data['step'] == 'phpmail' ? 'text-center'
13 - : ''; ?>"><?php echo acym_translation('ACYM_SENDING_MEHTODS'); ?></div>
17 + : ''; ?>"><?php echo esc_html(acym_translation('ACYM_SENDING_MEHTODS')); ?></div>
14 18 <?php } ?>
15 19 <div class="cell grid-x grid-margin-x grid-margin-y acym__sending__methods__choose__selection text-center <?php echo !empty($data['step']) && $data['step'] == 'phpmail'
16 20 ? 'align-center'
17 21 : ''; ?>">
@@ -19,33 +23,39 @@
19 23 foreach ($services as $key => $sendingMethod) {
20 24 if (!empty($data['isSml']) && $key === 'acymailer') {
21 25 continue;
22 26 }
23 -
27 +
24 28 $selected = isset($sendingMethod['selected']) && $sendingMethod['selected'];
25 29 $class = !empty($sendingMethod['recommended']) ? 'acym__sending__methods__one__premium' : '';
26 30 $class .= empty($data['step']) ? ' acym__sending__methods__one__config' : '';
27 - $name = !empty($sendingMethod['recommended']) ? $sendingMethod['name'].' <br>('.acym_translation('ACYM_RECOMMENDED').')' : $sendingMethod['name'];
28 31 $idCheckbox = 'acym__sending__methods-'.(empty($data['isSml']) ? 'default' : 'sml').'-'.$key;
29 32 ?>
30 - <div class="cell large-3 medium-6 grid-x align-center acym_vcenter acym__sending__methods__one <?php echo $class; ?>">
31 - <label for="<?php echo $idCheckbox ?>" data-acym-method="<?php echo $key; ?>"
32 - class="acym__selection__card cell acym_vcenter align-center <?php echo $selected ? 'acym__selection__card-selected' : ''; ?>">
33 + <div class="cell large-3 medium-6 grid-x align-center acym_vcenter acym__sending__methods__one <?php echo esc_attr($class); ?>">
34 + <label for="<?php echo esc_attr($idCheckbox); ?>" data-acym-method="<?php echo esc_attr($key); ?>"
35 + class="acym__selection__card cell acym_vcenter align-center <?php echo $selected ? 'acym__selection__card-selected' : ''; ?>">
33 36 <?php
34 37 if (!empty($sendingMethod['icon'])) { ?>
35 - <i class="cell <?php echo $sendingMethod['icon']; ?> text-center"></i>
38 + <i class="cell <?php echo esc_attr($sendingMethod['icon']); ?> text-center"></i>
36 39 <?php } else { ?>
37 - <img src="<?php echo $sendingMethod['image']; ?>"
38 - alt=""
39 - class="cell <?php echo !empty($sendingMethod['image_class']) ? $sendingMethod['image_class'] : '' ?>">
40 + <img src="<?php echo esc_url($sendingMethod['image']); ?>"
41 + alt=""
42 + class="cell <?php echo !empty($sendingMethod['image_class']) ? esc_attr($sendingMethod['image_class']) : ''; ?>">
40 43 <?php } ?>
41 44 </label>
42 - <span class="cell acym__sending__methods__name"><?php echo $name; ?></span>
45 + <span class="cell acym__sending__methods__name">
46 + <?php
47 + echo esc_html($sendingMethod['name']);
48 + if (!empty($sendingMethod['recommended'])) {
49 + echo ' <br>('.esc_html(acym_translation('ACYM_RECOMMENDED')).')';
50 + }
51 + ?>
52 + </span>
43 53 <input type="radio"
44 - name="<?php echo !empty($data['isSml']) ? 'sml' : 'config' ?>[mailer_method]"
45 - <?php echo $selected ? 'checked' : ''; ?>
46 - id="<?php echo $idCheckbox; ?>"
47 - value="<?php echo $key; ?>"
54 + name="<?php echo !empty($data['isSml']) ? 'sml' : 'config'; ?>[mailer_method]"
55 + <?php checked($selected); ?>
56 + id="<?php echo esc_attr($idCheckbox); ?>"
57 + value="<?php echo esc_attr($key); ?>"
48 58 style="display: none">
49 59 </div>
50 60 <?php } ?>
51 61 </div>
@@ -55,12 +65,8 @@
55 65 $class = 'medium-10';
56 66 echo '<div class="cell medium-1 hide-for-small-only"></div>';
57 67 }
58 68 ?>
59 - <div class="cell <?php echo $class; ?> grid-x text-left">
60 - <?php
61 - foreach ($data['sendingMethodsHtmlSettings'] as $html) {
62 - echo $html;
63 - }
64 - ?>
69 + <div class="cell <?php echo esc_attr($class); ?> grid-x">
70 + <?php acym_trigger('onAcymGetSendingMethodsHtmlSetting', [&$data]); ?>
65 71 </div>
66 72 </div>