PluginProbe
Tagembed: Social Media Feeds and Customer Reviews Widget / 5.0
Tagembed: Social Media Feeds and Customer Reviews Widget v5.0
7.8 7.5 7.6 7.7 7.4 trunk 3.10 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 All 43 releases
tagembed-widget / views / includes / footerView.php

footerView.php in Tagembed: Social Media Feeds and Customer Reviews Widget 5.0, at views/includes/footerView.php

162 lines 8.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ($__tagembed__chat_script): ?>
2 <!--Start-- Tagembed Chat Script -->
3 <script type="text/javascript">
4 /*--Start-- Manage Intercom Chat And Setting Data */
5 window.addEventListener ? window.addEventListener("load", __tagembed__getAndManageIntercomSetting, false) : window.attachEvent && window.attachEvent("onload", __tagembed__getAndManageIntercomSetting);
6 function __tagembed__getAndManageIntercomSetting() {
7 let formData = new FormData();
8 formData.append('action', 'data');
9 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones);
10 formData.append('__tagembed__ajax_action', '__tagembed__get_and_manage_intercom_chat_setting');
11 fetch(__tagembed__ajax_url, {method: 'POST', headers: {'x-requested-with': 'XMLHttpRequest'}, body: formData,
12 }).then(response => {
13 return response.json();
14 }).then(response => {
15 if (response.status == true) {
16 /*--Start--Manage Intercom Setting Data*/
17 window.intercomSettings = {
18 api_base: "https://api-iam.intercom.io",
19 app_id: "t8e1b7uq",
20 email: response.data.email,
21 user_id: response.data.userId,
22 user_hash: response.data.userHash,
23 billing_email: response.data.billingEmail,
24 name: response.data.name,
25 created_at: response.data.created,
26 user_type: response.data.type,
27 plan: response.data.plan,
28 active_plan: response.data.activePlan,
29 product: response.data.product,
30 active_product: response.data.activeProduct
31 };
32 /*--End--Manage Intercom Setting Data*/
33 /*--Start--Manage Intercom Calling Script*/
34 var w = window;
35 var ic = w.Intercom;
36 if (typeof ic === "function") {
37 ic('reattach_activator');
38 ic('update', w.intercomSettings);
39 } else {
40 var d = document;
41 var i = function () {
42 i.c(arguments);
43 };
44 i.q = [];
45 i.c = function (args) {
46 i.q.push(args);
47 };
48 w.Intercom = i;
49 var l = function () {
50 var s = d.createElement('script');
51 s.type = 'text/javascript';
52 s.async = true;
53 s.src = 'https://widget.intercom.io/widget/t8e1b7uq';
54 var x = d.getElementsByTagName('script')[0];
55 x.parentNode.insertBefore(s, x);
56 };
57 if (document.readyState === 'complete') {
58 l();
59 } else if (w.attachEvent) {
60 w.attachEvent('onload', l);
61 } else {
62 w.addEventListener('load', l, false);
63 }
64 }
65 /*--End--Manage Intercom Calling Script*/
66 }
67 }).catch((error) => {
68 console.log(error);
69 });
70 }
71 /*--End-- Manage Intercom Chat And Setting Data */
72 </script>
73 <?php endif; ?>
74 <!--End-- Tagembed Chat Script -->
75 </div>
76 </div>
77 <!--Start-- Manage Next And Back Button On All Pages -->
78 <div id="__tagembed__next_and_back_link_main_section"></div>
79 <!--End-- Manage Next And Back Button On All Pages -->
80 </div>
81 </div>
82 <!-- Other Default WordPress Css -->
83 <style> #footer-thankyou {font-style: normal !important;}</style>
84 <?php if ($__tagembed__active_menue_id != 4): ?>
85 <style> body{min-height: auto!important;} </style>
86 <?php endif; ?>
87 <?php if ($__tagembed__active_menue_id == 6): ?>
88 <script>
89 /*--Start-- Manage Embed Accordion Section*/
90 let __tagembed__accordionItem = document.getElementsByClassName('__tagembed__accordionItem');
91 let __tagembed__accordionItemHeading = document.getElementsByClassName('__tagembed__accordionItemHeading');
92 for (i = 0; i < __tagembed__accordionItemHeading.length; i++)
93 __tagembed__accordionItemHeading[i].addEventListener('click', __tagembed__toggleAccodionSection, false);
94 function __tagembed__toggleAccodionSection() {
95 let __tagembed__accordionSectionClass = this.parentNode.className;
96 for (i = 0; i < __tagembed__accordionItem.length; i++)
97 __tagembed__accordionItem[i].className = '__tagembed__accordionItem __tagembed__close';
98 if (__tagembed__accordionSectionClass == '__tagembed__accordionItem __tagembed__close')
99 this.parentNode.className = '__tagembed__accordionItem __tagembed__open';
100 }
101 /*--End-- Manage Embed Accordion Section*/
102 </script>
103 <?php endif; ?>
104 <script>
105 /*--Start-- Manage And Generate Next And Back Link In Footer*/
106 function __tagembed__manageNextAndBackButon() {
107 let __tagembed__nextLink = null;
108 let __tagembed__backLink = null;
109 let __tagembed__nextAndBackLinkHtml = "";
110 let __tagembed__next_and_back_link_main_section = document.querySelector("#__tagembed__next_and_back_link_main_section");
111 __tagembed__next_and_back_link_main_section.innerHTML = "";
112 let __tagembed__nextAndBackLinkSectionStyle = "block";
113 let __tagembed__widgets_count = "<?php echo esc_html($__tagembed__widgets_count); ?>";
114 let __tagembed__active_menue_id = "<?php echo esc_html($__tagembed__active_menue_id); ?>";
115 if (__tagembed__widgets_count == 0) {
116 __tagembed__nextAndBackLinkSectionStyle = "none";
117 }
118 switch (__tagembed__active_menue_id) {
119 case "1" :
120 __tagembed__nextLink = "2";
121 __tagembed__backLink = null;
122 break;
123 case "2" :
124 __tagembed__nextLink = "3";
125 __tagembed__backLink = "1";
126 __tagembed__nextAndBackLinkSectionStyle = "none"; /* Show In tagembed.feed.script.js */
127 break;
128 case "3" :
129 __tagembed__nextLink = "4";
130 __tagembed__backLink = "2";
131 break;
132 case "4" :
133 __tagembed__nextLink = "5";
134 __tagembed__backLink = "3";
135 break;
136 case "5" :
137 __tagembed__nextLink = "6";
138 __tagembed__backLink = "4";
139 break;
140 case "6" :
141 __tagembed__nextLink = null;
142 __tagembed__backLink = "5";
143 break;
144 }
145 /* Manage Next And Back */
146 if (__tagembed__nextLink != null || __tagembed__backLink != null) {
147 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<div class="__tagembed__foot_nextprevious" id="__tagembed__next_and_back_link_section" style="display:${__tagembed__nextAndBackLinkSectionStyle}">`;
148 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<div class="__tagembed__footnp_inn">`;
149 if (__tagembed__backLink != null) {
150 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<button class="__tagembed__btn __tagembed__backbtn" onclick="__tagembed__menus(${__tagembed__backLink});"> <i class="fas fa-angle-left"></i> Back </button>`;
151 }
152 if (__tagembed__nextLink != null) {
153 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<button class="__tagembed__btn" onclick="__tagembed__menus(${__tagembed__nextLink});">Next <i class="fas fa-angle-right"></i> </button>`;
154 }
155 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}</div></div>`;
156 __tagembed__next_and_back_link_main_section.innerHTML = __tagembed__nextAndBackLinkHtml;
157 }
158 }
159 window.onload = __tagembed__manageNextAndBackButon();
160 /*--End-- Manage And Generate Next And Back Link In Footer*/
161 </script>
162