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/editor/versions.php +32 -27 10.2.2 → 11.1.0 View file →
@@ -1,5 +1,7 @@
1 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');
2 4
3 5 use AcyMailing\Classes\TagClass;
4 6
5 7 if (empty($data['mailInformation'])) {
@@ -8,16 +10,18 @@
8 10
9 11 $isAbTest = !empty($data['abtest']);
10 12
11 13 ?>
12 -<input type="hidden" name="version_type" value="<?php echo $isAbTest ? 'abtest' : 'multilingual'; ?>">
14 +<input type="hidden" name="current_version" id="current_version" value="main" />
15 +<input type="hidden" name="version_type" value="<?php echo $isAbTest ? 'abtest' : 'multilingual'; ?>" />
13 16 <div class="cell acym__wysid__edit__versions-<?php echo $isAbTest ? 'abtest' : 'multilingual'; ?>" id="acym__wysid__edit__versions">
14 17 <div class="acym__title acym__title__secondary">
15 18 <?php
16 19 if ($isAbTest) {
17 - echo acym_translation('ACYM_VERSIONS');
20 + echo esc_html(acym_translation('ACYM_VERSIONS'));
18 21 } else {
19 - echo acym_translation('ACYM_CONFIGURATION_LANGUAGES').acym_info('ACYM_MULTILINGUAL_DESC');
22 + echo esc_html(acym_translation('ACYM_CONFIGURATION_LANGUAGES'));
23 + acym_info(['textShownInTooltip' => 'ACYM_MULTILINGUAL_DESC']);
20 24 } ?>
21 25 </div>
22 26
23 27 <div class="acym__wysid__edit__versions__selection acym__wysid__edit__versions-selected">
@@ -24,11 +28,11 @@
24 28 <?php
25 29 if ($isAbTest) {
26 30 echo '<i class="acymicon-pencil acym__wysid__edit__versions__selection__edition"></i>
27 31 <i class="acymicon-check acym__wysid__edit__versions__selection__check"></i>
28 - <span class="acym__wysid__edit__versions__selection__element" acym-data-version="main">'.$data['main_version']->name.'</span>';
32 + <span class="acym__wysid__edit__versions__selection__element" acym-data-version="main">'.esc_html($data['main_version']->name).'</span>';
29 33 } else {
30 - echo acym_tooltip(
34 + acym_tooltip(
31 35 [
32 36 'hoveredText' => '<i class="acymicon-pencil acym__wysid__edit__versions__selection__edition"></i>
33 37 <i class="acymicon-check acym__wysid__edit__versions__selection__check"></i>
34 38 <img
@@ -46,9 +50,9 @@
46 50 <?php
47 51 $code = $isAbTest ? $data['main_version']->name : $data['main_language']->code;
48 52 ?>
49 53 <?php if (!$isAbTest) { ?>
50 - <input type="hidden" name="mail[language]" value="<?php echo acym_escape($code); ?>">
54 + <input type="hidden" name="mail[language]" value="<?php echo esc_attr($code); ?>">
51 55 <?php } ?>
52 56 <input type="hidden" name="versions[main][subject]" value="">
53 57 <input type="hidden" name="versions[main][preview]" value="">
54 58 <input type="hidden" name="versions[main][content]" value="">
@@ -67,16 +71,18 @@
67 71 }
68 72 ?>
69 73
70 74 <div class="acym__wysid__edit__versions__separator"></div>
71 - <div class="<?php echo $containerClass; ?>">
75 + <div class="<?php echo esc_attr($containerClass); ?>">
72 76 <?php
73 77 if ($isAbTest) {
74 78 echo '<i class="acymicon-pencil acym__wysid__edit__versions__selection__edition"></i>
75 79 <i class="acymicon-check acym__wysid__edit__versions__selection__check"></i>
76 - <span class="acym__wysid__edit__versions__selection__element" acym-data-version="'.$version->code.'">'.$version->name.'</span>';
80 + <span class="acym__wysid__edit__versions__selection__element" acym-data-version="'.esc_attr($version->code).'">'.esc_html(
81 + $version->name
82 + ).'</span>';
77 83 } else {
78 - echo acym_tooltip(
84 + acym_tooltip(
79 85 [
80 86 'hoveredText' => '<i class="acymicon-pencil acym__wysid__edit__versions__selection__edition"></i>
81 87 <i class="acymicon-check acym__wysid__edit__versions__selection__check"></i>
82 88 <img
@@ -89,14 +95,14 @@
89 95 );
90 96 }
91 97 ?>
92 98
93 - <input type="hidden" name="versions[<?php echo $version->code; ?>][subject]" value="<?php echo acym_escape($version->subject); ?>">
94 - <input type="hidden" name="versions[<?php echo $version->code; ?>][preview]" value="<?php echo acym_escape($version->preview); ?>">
95 - <input type="hidden" name="versions[<?php echo $version->code; ?>][content]" value="<?php echo acym_escape($version->content); ?>">
96 - <input type="hidden" name="versions[<?php echo $version->code; ?>][autosave]" value="<?php echo acym_escape($version->autosave); ?>">
97 - <input type="hidden" name="versions[<?php echo $version->code; ?>][settings]" value="<?php echo acym_escape($version->settings); ?>">
98 - <input type="hidden" name="versions[<?php echo $version->code; ?>][stylesheet]" value="<?php echo acym_escape($version->stylesheet); ?>">
99 + <input type="hidden" name="versions[<?php echo esc_attr($version->code); ?>][subject]" value="<?php echo esc_attr($version->subject); ?>">
100 + <input type="hidden" name="versions[<?php echo esc_attr($version->code); ?>][preview]" value="<?php echo esc_attr($version->preview); ?>">
101 + <input type="hidden" name="versions[<?php echo esc_attr($version->code); ?>][content]" value="<?php echo esc_attr($version->content); ?>">
102 + <input type="hidden" name="versions[<?php echo esc_attr($version->code); ?>][autosave]" value="<?php echo esc_attr($version->autosave); ?>">
103 + <input type="hidden" name="versions[<?php echo esc_attr($version->code); ?>][settings]" value="<?php echo esc_attr($version->settings); ?>">
104 + <input type="hidden" name="versions[<?php echo esc_attr($version->code); ?>][stylesheet]" value="<?php echo esc_attr($version->stylesheet); ?>">
99 105 </div>
100 106 <?php
101 107 }
102 108 ?>
@@ -102,32 +108,31 @@
102 108 ?>
103 109 </div>
104 110
105 111 <div id="acym__wysid__edit__versions__creation" class="cell grid-x grid-margin-x text-center align-center is-hidden">
106 - <h5><?php echo acym_translation($isAbTest ? 'ACYM_VERSION_CREATION_TITLE' : 'ACYM_MULTILINGUAL_CREATION_TITLE'); ?></h5>
107 - <div class="cell"><?php echo acym_translation($isAbTest ? 'ACYM_VERSION_CREATION_DESCRIPTION' : 'ACYM_MULTILINGUAL_CREATION_DESCRIPTION'); ?></div>
112 + <h5><?php echo esc_html(acym_translation($isAbTest ? 'ACYM_VERSION_CREATION_TITLE' : 'ACYM_MULTILINGUAL_CREATION_TITLE')); ?></h5>
113 + <div class="cell"><?php echo esc_html(acym_translation($isAbTest ? 'ACYM_VERSION_CREATION_DESCRIPTION' : 'ACYM_MULTILINGUAL_CREATION_DESCRIPTION')); ?></div>
108 114 <button type="button" class="cell button xlarge-4 large-4 margin-top-1 button-secondary" id="acym__wysid__edit__versions__creation__default">
109 - <?php echo acym_translation('ACYM_MULTILINGUAL_CREATION_FROM_DEFAULT'); ?>
115 + <?php echo esc_html(acym_translation('ACYM_MULTILINGUAL_CREATION_FROM_DEFAULT')); ?>
110 116 </button>
111 117 <button type="button" class="cell button xlarge-4 large-4 margin-top-1 button-secondary" id="acym__wysid__edit__versions__creation__scratch">
112 - <?php echo acym_translation('ACYM_MULTILINGUAL_CREATION_FROM_SCRATCH'); ?>
118 + <?php echo esc_html(acym_translation('ACYM_MULTILINGUAL_CREATION_FROM_SCRATCH')); ?>
113 119 </button>
114 120 <button type="button"
115 - data-open="acym__template__choose__modal"
116 - aria-controls="acym__template__choose__modal"
117 - tabindex="0"
118 - aria-haspopup="true"
119 - class="cell button xlarge-4 large-4 margin-top-1 button-secondary">
120 - <?php echo acym_translation('ACYM_START_FROM_TEMPLATE'); ?>
121 + data-open="acym__template__choose__modal"
122 + aria-controls="acym__template__choose__modal"
123 + tabindex="0"
124 + aria-haspopup="true"
125 + class="cell button xlarge-4 large-4 margin-top-1 button-secondary">
126 + <?php echo esc_html(acym_translation('ACYM_START_FROM_TEMPLATE')); ?>
121 127 </button>
122 128 <?php
123 129 $dataForTemplate = ['allTags' => $data['tagClass']->getAllTagsByType(TagClass::TYPE_MAIL)];
124 - echo acym_modal_include(
130 + acym_modalInclude(
125 131 '',
126 132 ACYM_VIEW.'Mails'.DS.'tmpl'.DS.'choose_template_ajax.php',
127 133 'acym__template__choose__modal',
128 134 $dataForTemplate,
129 - '',
130 135 'acym__template__choose__modal__listing'
131 136 );
132 137 ?>
133 138 </div>