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/Views/Automation/tmpl/action.php +41 -21 10.2.2 → 11.1.0 View file →
@@ -1,15 +1,17 @@
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 ?>
6 -<form id="acym_form" action="<?php echo acym_completeLink(acym_getVar('cmd', 'ctrl')); ?>" method="post" name="acyForm" data-abide novalidate>
8 +<form id="acym_form" action="<?php echo esc_url(acym_completeLink(acym_getVar('cmd', 'ctrl'))); ?>" method="post" name="acyForm" data-abide novalidate>
7 9 <input type="hidden" name="id" value="<?php echo empty($data['id']) ? '' : intval($data['id']); ?>">
8 10 <input type="hidden" name="actionId" value="<?php echo empty($data['action']->id) ? '' : intval($data['action']->id); ?>">
9 11 <input type="hidden" name="conditionId" value="<?php echo empty($data['condition']->id) ? '' : intval($data['condition']->id); ?>">
10 12 <input type="hidden" name="stepAutomationId" value="<?php echo empty($data['step_automation_id']) ? '' : intval($data['step_automation_id']); ?>">
11 - <input type="hidden" id="actions" value="<?php echo acym_escape($data['action']->actions); ?>">
13 + <input type="hidden" id="actions" value="<?php echo esc_attr($data['action']->actions); ?>">
12 14 <input type="hidden" id="adminAutomation" name="automation_admin" value="<?php echo empty($data['automation']->admin) ? 0 : 1; ?>">
13 15 <input type="hidden" id="acym__automation__action__number__action" value="0">
14 16
15 17 <div style="display: none">
@@ -14,14 +16,13 @@
14 16
15 17 <div style="display: none">
16 18 <?php
17 19 $dataForTemplate = ['allTags' => $data['tagClass']->getAllTagsByType(TagClass::TYPE_MAIL)];
18 - echo acym_modalInclude(
20 + acym_modalInclude(
19 21 '',
20 22 ACYM_VIEW.'Mails'.DS.'tmpl'.DS.'choose_template_ajax.php',
21 23 'acym__template__choose__modal',
22 24 $dataForTemplate,
23 - '',
24 25 'acym__template__choose__modal__listing'
25 26 );
26 27 ?>
27 28 </div>
@@ -27,44 +28,63 @@
27 28 </div>
28 29
29 30 <div class="acym__content grid-x cell" id="acym__automation__actions">
30 31 <?php
31 - echo $data['workflowHelper']->display($this->steps, 'action');
32 + $data['workflowHelper']->display($this->steps, 'action');
32 33 ?>
33 34 <div id="acym__automation__example" style="display: none">
34 35 <div class="acym__automation__actions__one__action cell grid-x">
35 36 <div class="acym__automation__and cell grid-x margin-top-2">
36 - <h6 class="cell medium-shrink small-11 acym__title acym__title__secondary"><?php echo acym_translation('ACYM_AND'); ?></h6>
37 + <h6 class="cell medium-shrink small-11 acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_AND')); ?></h6>
37 38 <div class="cell medium-4 hide-for-small-only"></div>
38 39 <i class="cell medium-shrink small-1 cursor-pointer acymicon-close acym__color__red acym__automation__delete__one__action"></i>
39 40 </div>
40 41 <div class="medium-5 cell">
41 42 <?php
42 - echo acym_select(
43 + acym_select(
43 44 $data['actionsOption'],
44 45 'action_name',
45 46 null,
46 - ['class' => 'acym__automation__actions__select']
47 + ['class' => 'acym__automation__actions__select'],
48 + 'value',
49 + 'text',
50 + null,
51 + false,
52 + true
47 53 );
48 54 ?>
49 55 </div>
50 56 </div>
51 57 </div>
52 - <input type="hidden" id="acym__automation__actions__json" value='<?php echo acym_escape($data['actions']); ?>'>
53 - <h6 class="acym__title acym__title__secondary cell"><?php echo acym_translation('ACYM_SELECT_YOUR_ACTIONS'); ?></h6>
58 + <?php
59 + foreach ($data['actions'] as $key => $action) {
60 + if (empty($key)) {
61 + continue;
62 + }
63 + ?>
64 + <template id="acym__automation__actions__template__<?php echo esc_attr($key); ?>">
65 + <?php acym_displayAddonOption($action); ?>
66 + </template>
67 + <?php } ?>
68 + <h6 class="acym__title acym__title__secondary cell"><?php echo esc_html(acym_translation('ACYM_SELECT_YOUR_ACTIONS')); ?></h6>
54 69 <div class="cell grid-x acym__content">
55 70 <div class="acym__automation__actions__one__action cell grid-x" data-action-number="0">
56 71 <div class="medium-5 cell">
57 - <?php echo acym_select(
72 + <?php acym_select(
58 73 $data['actionsOption'],
59 74 'action_name',
60 75 null,
61 - ['class' => 'acym__select acym__automation__actions__select']
76 + ['class' => 'acym__select acym__automation__actions__select'],
77 + 'value',
78 + 'text',
79 + null,
80 + false,
81 + true
62 82 ); ?>
63 83 </div>
64 84 </div>
65 85 <button data-filter-type="" type="button" class="button-secondary button medium-shrink acym__automation__add-action margin-top-2">
66 - <?php echo acym_translation('ACYM_ADD_ACTION'); ?>
86 + <?php echo esc_html(acym_translation('ACYM_ADD_ACTION')); ?>
67 87 </button>
68 88 </div>
69 89 <div class="cell grid-x grid-margin-x margin-top-2">
70 90 <?php if (empty($data['id'])) { ?>
@@ -70,28 +90,28 @@
70 90 <?php if (empty($data['id'])) { ?>
71 91 <div class="cell medium-auto grid-x grid-margin-x text-right">
72 92 <div class="cell auto"></div>
73 93 <button type="button" class="button button-secondary acy_button_submit medium-shrink cell" data-task="listing">
74 - <?php echo acym_translation('ACYM_CANCEL'); ?>
94 + <?php echo esc_html(acym_translation('ACYM_CANCEL')); ?>
75 95 </button>
76 96 <button type="button" class="button acy_button_submit medium-shrink cell" data-task="edit" data-step="setActionMassAction">
77 - <?php echo acym_translation('ACYM_SET_ACTIONS_TARGETS'); ?>
97 + <?php echo esc_html(acym_translation('ACYM_SET_ACTIONS_TARGETS')); ?>
78 98 </button>
79 99 </div>
80 100 <?php } else { ?>
81 101 <div class="cell medium-shrink medium-margin-bottom-0 margin-bottom-1 text-left">
82 - <?php echo acym_backToListing('automation'); ?>
102 + <?php acym_backToListing('automation'); ?>
83 103 </div>
84 104 <div class="cell medium-auto grid-x grid-margin-x text-right">
85 105 <div class="cell auto"></div>
86 106 <button type="button"
87 - class="cell button button-secondary medium-shrink medium-margin-bottom-0 margin-bottom-1 acy_button_submit"
88 - data-task="edit"
89 - data-step="saveExitActions">
90 - <?php echo acym_translation('ACYM_SAVE_EXIT'); ?>
107 + class="cell button button-secondary medium-shrink medium-margin-bottom-0 margin-bottom-1 acy_button_submit"
108 + data-task="edit"
109 + data-step="saveExitActions">
110 + <?php echo esc_html(acym_translation('ACYM_SAVE_EXIT')); ?>
91 111 </button>
92 112 <button type="button" class="cell button medium-shrink medium-margin-bottom-0 acy_button_submit" data-task="edit" data-step="saveActions">
93 - <?php echo acym_translation('ACYM_SAVE_CONTINUE'); ?>
113 + <?php echo esc_html(acym_translation('ACYM_SAVE_CONTINUE')); ?>
94 114 </button>
95 115 </div>
96 116 <?php } ?>
97 117 </div>