PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.2
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.2
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 / Views / Bounces / tmpl / rule_summary.php

rule_summary.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.2, at back/Views/Bounces/tmpl/rule_summary.php

113 lines 6.2 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 $texts = [
5 'senderInfo' => acym_translation('ACYM_SENDER_INFORMATION'),
6 'subject' => acym_translation('ACYM_EMAIL_SUBJECT'),
7 'body' => acym_translation('ACYM_BODY'),
8 ];
9 ?>
10
11 <div class="acym__bounces__summary acym__content cell grid-x large-8 margin-bottom-1">
12 <div id="acym__bounces__summary__changes" class="cell small-9 acym__color__orange" style="display:none;"><?php echo esc_html(
13 acym_translation('ACYM_CHANGES_PLEASE_SAVE')
14 ); ?></div>
15
16 <!-- GLOBAL -->
17 <div class="cell grid-x padding-left-1 padding-bottom-1">
18 <label class="cell grid-x grid-margin-x">
19 <span class="cell medium-3 acym__label text-right"><?php echo esc_html(acym_translation('ACYM_REGEX')); ?>:</span>
20 <div class="cell medium-9 acym__label">
21 <span class="acym__color__dark-gray">#</span>
22 <span id="acym__bounces__sum__regex"><?php echo esc_html((empty($data['rule']) || empty($data['rule']->regex)) ? ' ' : $data['rule']->regex); ?></span>
23 <span class="acym__color__dark-gray">#ims</span>
24 </div>
25 </label>
26 <label class="cell grid-x grid-margin-x">
27 <span class="cell medium-3 acym__label text-right"><?php echo esc_html(acym_translation('ACYM_APPLIED_ON')); ?>:</span>
28 <?php
29 $appliedOn = [];
30 foreach ($data['rule']->executed_on as $oneApplied) {
31 $appliedOn[] = $texts[$oneApplied];
32 }
33 ?>
34 <span class="cell medium-9" id="acym__bounces__sum__applied"><?php echo esc_html(implode(', ', $appliedOn)); ?></span>
35 </label>
36 <span class="cell acym__label<?php echo !$data['rule']->increment_stats ? ' is-hidden' : ''; ?>" id="acym__bounces__sum__stats">
37 <?php echo esc_html(acym_translation('ACYM_INCREMENT_BOUNCE_STATISTICS_IF_RULE_MATCHES')); ?>
38 </span>
39 </div>
40 <!-- USER -->
41 <div class="cell grid-x padding-left-1 padding-bottom-1">
42 <label class="cell grid-x grid-margin-x">
43 <span class="cell medium-3 text-right acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_ACTION_ON_USER')); ?>:</span>
44 <div class="cell medium-9 acym__label grid-x">
45 <?php
46 echo '<div class="cell">'.wp_kses(
47 acym_translationSprintf(
48 'ACYM_EXECUTE_ACTIONS_AFTER',
49 '<span id="acym__bounces__sum__exec">'.esc_html($data['rule']->execute_action_after).'</span>'
50 ),
51 [
52 'span' => [
53 'id' => true,
54 ],
55 ]
56 ).'<br /></div>';
57 $actionsUsers = [
58 'delete_user_subscription' => ['id' => 'acym__bounces__sum__delsub', 'text' => 'ACYM_REMOVE_SUB'],
59 'unsubscribe_user' => ['id' => 'acym__bounces__sum__unsub', 'text' => 'ACYM_UNSUB_USER'],
60 'block_user' => ['id' => 'acym__bounces__sum__block', 'text' => 'ACYM_BLOCK_USER'],
61 'delete_user' => ['id' => 'acym__bounces__sum__deluser', 'text' => 'ACYM_DELETE_USER'],
62 'empty_queue_user' => ['id' => 'acym__bounces__sum__emptyqueue', 'text' => 'ACYM_EMPTY_QUEUE_USER'],
63 'subscribe_user' => ['id' => 'acym__bounces__sum__sub', 'text' => 'ACYM_SUBSCRIBE_USER'],
64 ];
65 echo '<ul class="acym__ul">';
66 foreach ($actionsUsers as $keyAction => $oneAction) {
67 if (empty($data['rule']->action_user) || !in_array($keyAction, $data['rule']->action_user)) continue;
68 echo '<li id="'.esc_attr($oneAction['id']).'" class="cell">'.esc_html(acym_translation($oneAction['text']));
69 if ($keyAction === 'subscribe_user') {
70 $subscribeTo = ' ';
71 if (!empty($data['rule']->action_user['subscribe_user_list'])) $subscribeTo = $data['lists'][$data['rule']->action_user['subscribe_user_list']];
72 echo ' ( <span id="acym__bounces__sum__sub__details">'.esc_html($subscribeTo).'</span> )';
73 }
74 echo '</li>';
75 }
76 echo '</ul>';
77 ?>
78 </div>
79 </label>
80 </div>
81 <!-- EMAIL -->
82 <div class="cell grid-x padding-left-1 margin-bottom-1">
83 <label class="cell grid-x grid-margin-x">
84 <span class="cell medium-3 text-right acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_ACTION_ON_EMAIL')); ?>:</span>
85 <span class="cell medium-9 acym__label grid-x">
86 <?php
87 $actionsMsg = [
88 'save_message' => ['id' => 'acym__bounces__sum__savedb', 'text' => 'ACYM_SAVE_MESSAGE_DATABASE'],
89 'delete_message' => ['id' => 'acym__bounces__sum__deletemsg', 'text' => 'ACYM_DELETE_MESSAGE_FROM_MAILBOX'],
90 'forward_message' => ['id' => 'acym__bounces__sum__forward', 'text' => 'ACYM_FORWARD_EMAIL'],
91 ];
92 echo '<ul class="acym__ul">';
93 foreach ($actionsMsg as $keyMsg => $oneMsg) {
94 if (empty($data['rule']->action_message) || !in_array($keyMsg, $data['rule']->action_message)) continue;
95 echo '<li id="'.esc_attr($oneMsg['id']).'" class="cell">'.esc_html(acym_translation($oneMsg['text']));
96 if ($keyMsg == 'forward_message') {
97 $forwardTo = '';
98 if (!empty($data['rule']->action_message['forward_to'])) $forwardTo = $data['rule']->action_message['forward_to'];
99 echo ' <span id="acym__bounces__sum__forward__details">'.esc_html($forwardTo).'</span>';
100 }
101 echo '</li>';
102 }
103 echo '</ul>';
104 ?>
105 </span>
106 </label>
107 </div>
108 <!-- BUTTON -->
109 <div class="cell grid-x align-center">
110 <a class="button" id="acym__bounces__display_details"><?php echo esc_html(acym_translation('ACYM_EDIT')); ?></a>
111 </div>
112 </div>
113