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
acymailing / back / dynamics / override / OverrideInsertion.php

OverrideInsertion.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.1.0, at back/dynamics/override/OverrideInsertion.php

48 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use AcyMailing\Classes\OverrideClass;
4
5 trait OverrideInsertion
6 {
7 public function dynamicText(?int $mailId): ?object
8 {
9 $overridesClass = new OverrideClass();
10 $overrideParams = $overridesClass->getParamsByMailId($mailId);
11 if (!empty($overrideParams)) {
12 return $this->pluginDescription;
13 }
14
15 return null;
16 }
17
18 public function textPopup(): void
19 {
20 $mailId = acym_getVar('int', 'mail_id', 0);
21 if (empty($mailId)) return;
22 ?>
23 <script type="text/javascript">
24 function changeOverrideTag(tagname, element) {
25 if (!tagname) return;
26 setTag('{' + tagname + '}', element);
27 }
28 </script>
29 <?php
30 echo '<div class="acym__popup__listing text-center grid-x">';
31 echo '<h1 class="acym__title acym__title__secondary text-center cell">'.esc_html(acym_translation('ACYM_ORIGINAL_EMAIL_DATA')).'</h1>';
32
33 $overridesClass = new OverrideClass();
34 $overrideParams = $overridesClass->getParamsByMailId($mailId);
35
36 foreach ($overrideParams as $key => $overrideParam) {
37 echo '<div style="cursor:pointer"
38 class="grid-x medium-12 cell acym__row__no-listing acym__listing__row__popup text-left"
39 onclick="changeOverrideTag(\''.esc_attr($key).'\', jQuery(this));">
40 <div class="cell medium-6 small-12 acym__listing__title acym__listing__title__dynamics">'.esc_html($overrideParam['nicename']).'</div>
41 <div class="cell medium-6 small-12 acym__listing__title acym__listing__title__dynamics">'.esc_html($overrideParam['description']).'</div>
42 </div>';
43 }
44
45 echo '</div>';
46 }
47 }
48