PluginProbe
Tagembed: Social Media Feeds and Customer Reviews Widget / 7.4
Tagembed: Social Media Feeds and Customer Reviews Widget v7.4
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 7.4, at views/includes/footerView.php

259 lines 10.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <!--Start-- Upgrade Plan Overlay And Message-->
2 <div id="__tagembed__upgrade_plan_overlay" style="position:fixed;width:100%;height:100%;background:rgba(0,0,0,0.1);z-index:999;display:none;"></div>
3 <div id="__tagembed__plan_upgrade_message" class="__tagembed__plan_upgrade_message"></div>
4 <!--End-- Upgrade Plan Overlay And Message-->
5
6 <!--Start-- Call Tagembed Chat And Plugin Version Script After Login And Register-->
7 <?php if (!empty($__tagembed__user_details)) : ?>
8 <script type="text/javascript">
9 /*--Start-- Manage Intercom Chat And Setting Data */
10 window.addEventListener ? window.addEventListener("load", __tagembed__getAndManageIntercomSetting, false) : window.attachEvent && window.attachEvent("onload", __tagembed__getAndManageIntercomSetting);
11
12 function __tagembed__getAndManageIntercomSetting() {
13 let formData = new FormData();
14 formData.append('action', 'data');
15 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones);
16 formData.append('__tagembed__ajax_action', '__tagembed__get_and_manage_intercom_chat_setting');
17 fetch(__tagembed__ajax_url, {
18 method: 'POST',
19 headers: {
20 'x-requested-with': 'XMLHttpRequest'
21 },
22 body: formData,
23 }).then(response => {
24 return response.json();
25 }).then(response => {
26 if (response.status == true) {
27 /*--Start--Manage Intercom Setting Data*/
28 window.intercomSettings = {
29 api_base: "https://api-iam.intercom.io",
30 app_id: "veiaqij8",
31 email: response.data.email,
32 user_id: response.data.userId,
33 user_hash: response.data.userHash,
34 name: response.data.name,
35 };
36 /*--End--Manage Intercom Setting Data*/
37 /*--Start--Manage Intercom Calling Script*/
38 var w = window;
39 var ic = w.Intercom;
40 if (typeof ic === "function") {
41 ic('reattach_activator');
42 ic('update', w.intercomSettings);
43 } else {
44 var d = document;
45 var i = function() {
46 i.c(arguments);
47 };
48 i.q = [];
49 i.c = function(args) {
50 i.q.push(args);
51 };
52 w.Intercom = i;
53 var l = function() {
54 var s = d.createElement('script');
55 s.type = 'text/javascript';
56 s.async = true;
57 s.src = 'https://widget.intercom.io/widget/veiaqij8';
58 var x = d.getElementsByTagName('script')[0];
59 x.parentNode.insertBefore(s, x);
60 };
61 if (document.readyState === 'complete') {
62 l();
63 } else if (w.attachEvent) {
64 w.attachEvent('onload', l);
65 } else {
66 w.addEventListener('load', l, false);
67 }
68 }
69 /*--End--Manage Intercom Calling Script*/
70 }
71 }).catch((error) => {
72 console.log(error);
73 });
74 }
75 /*--Start-- Open Intercom Chat*/
76 document.addEventListener('click', function(e) {
77 if (e.target.closest('.__tagembed__intercom_chat_btn')) {
78 e.preventDefault();
79 if (typeof window.Intercom === "function") {
80 window.Intercom('show');
81 } else {
82 console.log('Intercom not loaded yet');
83 }
84 }
85 });
86 /*--End-- Open Intercom Chat*/
87 /*--End-- Manage Intercom Chat And Setting Data */
88 /*--Start-- Manage Hide And Show plugin Upgrade Message*/
89 window.addEventListener ? window.addEventListener("load", __tagembed__plugin_version, false) : window.attachEvent && window.attachEvent("onload", __tagembed__plugin_version);
90
91 function __tagembed__plugin_version() {
92 let __tagembed__toast = new TagembedToast;
93 let formData = new FormData();
94 formData.append('action', 'data');
95 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones);
96 formData.append('__tagembed__ajax_action', '__tagembed__plugin_version');
97 fetch(__tagembed__ajax_url, {
98 method: 'POST',
99 headers: {
100 'x-requested-with': 'XMLHttpRequest',
101 },
102 body: formData,
103 }).then(response => {
104 return response.json()
105 }).then(response => {
106 if (response.status == true) {
107 if (response.data.installedPluginVersion != response.data.livePluginVersion) {
108 let elemHTML = `<div class="__tagembed__popupwrap __tagembed__popup_md">`;
109 elemHTML = `${elemHTML}<button onclick="__tagembed__hide_plugin_upgrade_message();" type="button" class="__tagembed__closebtn"></button>`;
110 elemHTML = `${elemHTML}<div class="__tagembed__popupinn">`;
111 elemHTML = `${elemHTML}<div class="__tagembed__header"><h2>Update Plugin For Free</h2></div>`;
112 elemHTML = `${elemHTML}<hr class="__tagembed__horizontaborder">`;
113 elemHTML = `${elemHTML}<div class="__tagembed__formwbody">`;
114 elemHTML = `${elemHTML}<div class="__tagembed__formwrow">`;
115 elemHTML = `${elemHTML}<p><strong> Note : </strong> There is a new version of Tagembed Widget available. <strong> ${response.data.livePluginVersion} </strong> is a recommended Update For Performance Improvements. </p>`;
116 elemHTML = `${elemHTML}</div></div>`;
117 elemHTML = `${elemHTML}<div class = "__tagembed__btnwrap text-center">`;
118 elemHTML = `${elemHTML}<a style="background: #d63638;" href="${response.data.pluginUpgradeURL}" class="__tagembed__okaybtn">Update Plugin</a>`;
119 elemHTML = `${elemHTML}</div></div></div>`;
120 document.getElementById("__tagembed__plugin_upgrade_message").innerHTML = elemHTML;
121 }
122 } else {
123 __tagembed__toast.danger({
124 message: "Something went wrong. Please try after sometime",
125 position: '__tagembed__is-top-right'
126 });
127 }
128 }).catch((error) => {
129 console.log(error);
130 __tagembed__toast.danger({
131 message: "Something went wrong. Please try after sometime",
132 position: '__tagembed__is-top-right'
133 });
134 });
135 }
136
137 function __tagembed__hide_plugin_upgrade_message() {
138 let __tagembed__plugin_upgrade_message = document.querySelector("#__tagembed__plugin_upgrade_message")
139 __tagembed__plugin_upgrade_message.style.display = "none";
140 }
141 /*--End-- Manage Hide And Show plugin Upgrade Message*/
142 </script>
143 <?php endif; ?>
144 <!--End-- Call Tagembed Chat And Plugin Version Script After Login And Register-->
145 </div>
146 </div>
147 <!--Start-- Manage Next And Back Button On All Pages -->
148 <div id="__tagembed__next_and_back_link_main_section"></div>
149 <!--End-- Manage Next And Back Button On All Pages -->
150 </div>
151 </div>
152 <!-- Other Default WordPress Css -->
153 <style>
154 #footer-thankyou {
155 font-style: normal !important;
156 }
157 </style>
158 <?php if (4 != $__tagembed__active_menue_id) : ?>
159 <style>
160 body {
161 min-height: auto !important;
162 }
163 </style>
164 <?php endif; ?>
165 <?php if (6 == $__tagembed__active_menue_id) : ?>
166 <script>
167 /*--Start-- Manage Embed Accordion Section*/
168 let __tagembed__accordionItem = document.getElementsByClassName('__tagembed__accordionItem');
169 let __tagembed__accordionItemHeading = document.getElementsByClassName('__tagembed__accordionItemHeading');
170 for (i = 0; i < __tagembed__accordionItemHeading.length; i++)
171 __tagembed__accordionItemHeading[i].addEventListener('click', __tagembed__toggleAccodionSection, false);
172
173 function __tagembed__toggleAccodionSection() {
174 let __tagembed__accordionSectionClass = this.parentNode.className;
175 for (i = 0; i < __tagembed__accordionItem.length; i++)
176 __tagembed__accordionItem[i].className = '__tagembed__accordionItem __tagembed__close';
177 if (__tagembed__accordionSectionClass == '__tagembed__accordionItem __tagembed__close')
178 this.parentNode.className = '__tagembed__accordionItem __tagembed__open';
179 }
180 /*--End-- Manage Embed Accordion Section*/
181 </script>
182 <?php endif; ?>
183 <script>
184 /*--Start-- Manage And Generate Next And Back Link In Footer*/
185 function __tagembed__manageNextAndBackButon() {
186 let __tagembed__nextLink = null;
187 let __tagembed__backLink = null;
188 let __tagembed__nextAndBackLinkHtml = "";
189 let __tagembed__next_and_back_link_main_section = document.querySelector("#__tagembed__next_and_back_link_main_section");
190 __tagembed__next_and_back_link_main_section.innerHTML = "";
191 let __tagembed__nextAndBackLinkSectionStyle = "block";
192 let __tagembed__widgets_count = "<?php echo esc_html($__tagembed__widgets_count); ?>";
193 let __tagembed__active_menue_id = "<?php echo esc_html($__tagembed__active_menue_id); ?>";
194 if (__tagembed__widgets_count == 0) {
195 __tagembed__nextAndBackLinkSectionStyle = "none";
196 }
197 switch (__tagembed__active_menue_id) {
198 case "1":
199 __tagembed__nextLink = "2";
200 __tagembed__backLink = null;
201 break;
202 case "2":
203 __tagembed__nextLink = "3";
204 __tagembed__backLink = "1";
205 __tagembed__nextAndBackLinkSectionStyle = "none"; /* Show In tagembed.feed.script.js */
206 break;
207 case "3":
208 __tagembed__nextLink = "4";
209 __tagembed__backLink = "2";
210 break;
211 case "4":
212 __tagembed__nextLink = "5";
213 __tagembed__backLink = "3";
214 break;
215 case "5":
216 __tagembed__nextLink = "6";
217 __tagembed__backLink = "4";
218 break;
219 case "6":
220 __tagembed__nextLink = null;
221 __tagembed__backLink = "5";
222 break;
223 }
224 /* Manage Next And Back */
225 if (__tagembed__nextLink != null || __tagembed__backLink != null) {
226 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<div class="__tagembed__foot_nextprevious" id="__tagembed__next_and_back_link_section" style="display:${__tagembed__nextAndBackLinkSectionStyle}">`;
227 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<div class="__tagembed__footnp_inn">`;
228 if (__tagembed__backLink != null) {
229 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<button class="__tagembed__btn __tagembed__backbtn" onclick="__tagembed__menus(${__tagembed__backLink});"> <i class="fas fa-angle-left"></i> Back </button>`;
230 }
231 if (__tagembed__nextLink != null) {
232 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}<button class="__tagembed__btn" onclick="__tagembed__menus(${__tagembed__nextLink});">Next <i class="fas fa-angle-right"></i> </button>`;
233 }
234 __tagembed__nextAndBackLinkHtml = `${__tagembed__nextAndBackLinkHtml}</div></div>`;
235 __tagembed__next_and_back_link_main_section.innerHTML = __tagembed__nextAndBackLinkHtml;
236 }
237 }
238 window.onload = __tagembed__manageNextAndBackButon();
239 /*--End-- Manage And Generate Next And Back Link In Footer*/
240 </script>
241 <!--Start--Clarity Tracking Code -->
242 <script type="text/javascript">
243 document.addEventListener('DOMContentLoaded', function() {
244 (function(c, l, a, r, i, t, y) {
245 c[a] = c[a] || function() {
246 (c[a].q = c[a].q || []).push(arguments)
247 };
248 t = l.createElement(r);
249 t.async = 1;
250 t.src = "https://www.clarity.ms/tag/" + i;
251 y = l.getElementsByTagName(r)[0];
252 y.parentNode.insertBefore(t, y);
253 })(window, document, "clarity", "script", "jz1bviq7un");
254 var __tagembed__userEmailIdForClarity = "<?php echo esc_html($__tagembed__active_widget_user_email_id); ?>";
255 clarity("set", "userEmail", __tagembed__userEmailIdForClarity);
256 clarity("set", "type", "wordpress");
257 });
258 </script>
259 <!--End--Clarity Tracking Code -->