PluginProbe
Tagembed: Social Media Feeds and Customer Reviews Widget / 4.2
Tagembed: Social Media Feeds and Customer Reviews Widget v4.2
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 5.7 All 42 releases
tagembed-widget / views / includes / headView.php

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

71 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <!--<style>#wpfooter {display: none;}div#wpbody {min-height: calc(100vh - 65px);}</style>-->
2 <script type="text/javascript">
3 var __tagembed__ajax_url = "<?php echo esc_html(admin_url('admin-ajax.php')); ?>";
4 var __tagembed__network_already_exist_auth = [];
5 var TAGEMBED_PLUGIN_URL_JS = "<?php echo esc_html(TAGEMBED_PLUGIN_URL); ?>";
6 </script>
7 <?php
8 wp_enqueue_script('__jquery');
9 wp_enqueue_script('__tagembed__custom-js', TAGEMBED_PLUGIN_URL . '/assets/js/tagembed.common.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true);
10 wp_enqueue_script('__script-widget-js', TAGEMBED_PLUGIN_URL . '/assets/js/widget/tagembed.widget.script.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true);
11 /* --Start-- Manage Chat Hide And Show */
12 $__tagembed__chat_script = false; /* Use : Manage Chat Hide Show */
13 $__tagembed__chat_scripts_response = __tagembed__chat();
14 if (!empty($__tagembed__chat_scripts_response)):
15 if ($__tagembed__chat_scripts_response == 'all' || $__tagembed__chat_scripts_response == 'inner')
16 $__tagembed__chat_script = true;
17 endif;
18 /* --End-- Manage Chat Hide And Show */
19 $__tagembed__account_page = true; /* Use : Check User Token Valid Or Not */
20 $__tagembed__user_details = __tagembed__user();
21 $__tagembed__active_widget_user_id = __tagembed__activeWidgetUser();
22 $__tagembed__active_widget_user_name = !empty($__tagembed__user_details->name) ? $__tagembed__user_details->name : "";
23 $__tagembed__menus = __tagembed__menus();
24 $__tagembed__active_menue_id = NULL;
25 $__tagembed__active_widget_id = __tagembed__activeWidget();
26 $__tagembed__active_widget_id = !empty($__tagembed__active_widget_id) ? $__tagembed__active_widget_id : 0;
27 $__tagembed__widgets = __tagembed__widgets();
28 $__tagembed__widgets_count = count($__tagembed__widgets); /* Use In Next And Back Button */
29 /* $__tagembed__collaborators = __tagembed__collaborator($__tagembed__user_details->userId); */
30 ?>
31 <!--Start--Check User Access Token-->
32 <?php if (!empty($__tagembed__user_details)): ?>
33 <script>
34 window.addEventListener ? window.addEventListener("load", __tagembed__check_user_token, false) : window.attachEvent && window.attachEvent("onload", __tagembed__check_user_token);
35 function __tagembed__check_user_token() {
36 let __tagembed__toast = new TagembedToast;
37 __tagembed__open_loader();
38 let formData = new FormData();
39 formData.append('action', 'data');
40 formData.append('__tagembed__ajax_action', '__tagembed__check_user_token');
41 fetch(__tagembed__ajax_url, {
42 method: 'POST',
43 headers: {
44 'x-requested-with': 'XMLHttpRequest',
45 },
46 body: formData,
47 }).then(response => {
48 return response.json()
49 }).then(response => {
50 __tagembed__close_loader();
51 if (response.status === true) {
52 if (!response.data.head.status && response.data.head.code == 401)
53 location.reload();
54 } else {
55 __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
56 }
57 }).catch((error) => {
58 console.log(error);
59 __tagembed__close_loader();
60 __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
61 });
62 }
63 /*--End-- Check User Token*/
64 </script>
65 <?php endif; ?>
66 <!--End--Check User Access Token-->
67 <div id="__tagembed__plugin_upgrade_message"></div>
68 <div class="__tagembed__container">
69 <div class="__tagembed__row">
70 <div class="__tagembed__col __tagembed__col_12 __tagembed__widget">
71 <div class="__tagembed__widget_inn">