PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 10.1.4
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v10.1.4
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 10.1.4, at back/dynamics/override/OverrideInsertion.php

47 lines 1.6 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($mailId)
8 {
9 $overridesClass = new OverrideClass();
10 $overrideParams = $overridesClass->getParamsByMailId($mailId);
11 if (!empty($overrideParams)) {
12 return $this->pluginDescription;
13 }
14 }
15
16 public function textPopup()
17 {
18 $mailId = acym_getVar('int', 'mail_id', 0);
19 if (empty($mailId)) return;
20 ?>
21 <script type="text/javascript">
22 function changeOverrideTag(tagname, element) {
23 if (!tagname) return;
24 setTag('{' + tagname + '}', element);
25 }
26 </script>
27 <?php
28
29 $text = '<div class="acym__popup__listing text-center grid-x">';
30 $text .= '<h1 class="acym__title acym__title__secondary text-center cell">'.acym_translation('ACYM_ORIGINAL_EMAIL_DATA').'</h1>';
31
32 $overridesClass = new OverrideClass();
33 $overrideParams = $overridesClass->getParamsByMailId($mailId);
34
35 foreach ($overrideParams as $key => $overrideParam) {
36 $text .= '<div style="cursor:pointer" class="grid-x medium-12 cell acym__row__no-listing acym__listing__row__popup text-left" onclick="changeOverrideTag(\''.$key.'\', jQuery(this));" >
37 <div class="cell medium-6 small-12 acym__listing__title acym__listing__title__dynamics">'.$overrideParam['nicename'].'</div>
38 <div class="cell medium-6 small-12 acym__listing__title acym__listing__title__dynamics">'.$overrideParam['description'].'</div>
39 </div>';
40 }
41
42 $text .= '</div>';
43
44 echo $text;
45 }
46 }
47