PluginProbe
Lasso Lite – Affiliate Link Manager & Product Displays / 108
Lasso Lite – Affiliate Link Manager & Product Displays v108
158 157 155 156 154 153 152 151 150 149 148 trunk 0.9.9 104 105 106 107 108 109 110 111 112 113 114 115 All 57 releases
simple-urls / admin / views / footer.php

footer.php in Lasso Lite – Affiliate Link Manager & Product Displays 108, at admin/views/footer.php

159 lines 6.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Footer HTML
4 *
5 * @package Footer
6 */
7 use LassoLite\Admin\Constant;
8
9 use LassoLite\Classes\Enum;
10 use LassoLite\Classes\Helper;
11 use LassoLite\Classes\Page;
12 use LassoLite\Classes\Setting;
13
14 $current_page = $_GET['page'] ?? '';
15 $import_page_slug = Helper::add_prefix_page( Enum::PAGE_IMPORT );
16
17 $user_email = get_option( 'admin_email' ); // phpcs:ignore
18 $user_email = get_option( 'lasso_license_email', $user_email );
19
20 $settings = Setting::get_settings();
21 $support_enable = $settings[Enum::SUPPORT_ENABLED] ?? 0;
22 $general_disable_notification = (bool) $settings['general_disable_notification'];
23
24 $lasso_lite_setting = new Setting();
25 $plugins_for_import = $lasso_lite_setting->check_plugins_for_import();
26 $import_page_link = Page::get_lite_page_url( Enum::PAGE_IMPORT );
27
28 ?>
29
30 <div class="modal fade" id="modal-save-animation" data-backdrop="static" tabindex="-1" role="dialog">
31 <div class="modal-dialog" role="document">
32 <div class="modal-content p-5 shadow text-center">
33 <h3></h3>
34 <p>Saving your changes now.</p>
35 <div class="progress">
36 <div class="progress-bar progress-bar-striped progress-bar-animated green-bg" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div>
37 </div>
38 </div>
39 </div>
40 </div>
41
42 <div id="up-sell-modal">
43 <p class="large">This is a premium feature.</p>
44 <a href="https://getlasso.co/upgrade/" target="_blank">Upgrade to Lasso Pro</a>
45 </div>
46
47 <?php if ( ! $support_enable && ! $lasso_lite_setting->is_setting_onboarding_page() ) { ?>
48 <div id="fake-intercom-bubble-chat">
49 <div class="fake-intercom-bubble-chat-app-launcher-icon">
50 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 32">
51 <path d="M28 32s-4.714-1.855-8.527-3.34H3.437C1.54 28.66 0 27.026 0 25.013V3.644C0 1.633 1.54 0 3.437 0h21.125c1.898 0 3.437 1.632 3.437 3.645v18.404H28V32zm-4.139-11.982a.88.88 0 00-1.292-.105c-.03.026-3.015 2.681-8.57 2.681-5.486 0-8.517-2.636-8.571-2.684a.88.88 0 00-1.29.107 1.01 1.01 0 00-.219.708.992.992 0 00.318.664c.142.128 3.537 3.15 9.762 3.15 6.226 0 9.621-3.022 9.763-3.15a.992.992 0 00.317-.664 1.01 1.01 0 00-.218-.707z"></path>
52 </svg>
53 </div>
54 </div>
55 <?php } ?>
56
57 <?php
58 echo Helper::wrapper_js_render( 'import-suggestion-jsrender', Helper::get_path_views_folder() . 'notifications/import-suggestion-jsrender.html' );
59 ?>
60
61 <?php
62 // ? Show notification for import plugin
63 if ( '' !== $plugins_for_import && ! $general_disable_notification && $import_page_slug !== $current_page && Helper::is_importable() ) :
64 ?>
65 <script>
66 let json_data = [{ import_page_link: '<?php echo $import_page_link; ?>' }];
67 lasso_lite_helper.inject_to_template(jQuery("#lasso_lite_notifications"), 'import-suggestion-jsrender', json_data);
68 </script>
69 <?php endif; ?>
70
71 <!-- JS errors detection -->
72 <script
73 src="https://browser.sentry-cdn.com/7.1.1/bundle.tracing.min.js"
74 integrity="sha384-p+vO3NBBhOw0sRTPPPeAacfOonwgsAL2xTEYl6sQIHhmQ17LLZkxHV2/s9VSEeTn"
75 crossorigin="anonymous"
76 ></script>
77
78 <script>
79 let lasso_path = '<?php echo SIMPLE_URLS_URL; // phpcs:ignore ?>';
80 let post_type = 'post_type=<?php echo SIMPLE_URLS_SLUG; // phpcs:ignore ?>';
81
82 Sentry.init({
83 dsn: '<?php echo Constant::SENTRY_DSN; // phpcs:ignore ?>',
84 release: <?php echo LASSO_LITE_VERSION; // phpcs:ignore ?>,
85 ignoreErrors: [
86 'ResizeObserver loop limit exceeded',
87 'ResizeObserver loop completed with undelivered notifications',
88 '__ez is not defined',
89 '_ezaq is not defined',
90 'Can\'t find variable: _ezaq',
91 'wpColorPickerL10n is not defined',
92 'window.jQuery(...).wpColorPicker is not a function',
93 ],
94 integrations: [new Sentry.Integrations.BrowserTracing()],
95 tracesSampleRate: 1.0,
96 beforeSend(event, hint) {
97 try {
98 let is_lasso_lite_error = false;
99 let event_id = event.event_id;
100 let frames = event.exception.values[0].stacktrace.frames;
101 for(let i = 0; i < frames.length; i++) {
102 if(frames[i].filename.includes(lasso_path) || frames[i].filename.includes(post_type)) {
103 is_lasso_lite_error = true;
104 break;
105 }
106 }
107
108 if(is_lasso_lite_error) {
109 return event;
110 }
111 } catch (error) {
112 console.log(error);
113 }
114 }
115 });
116
117 Sentry.configureScope(function(scope) {
118 scope.setUser({
119 email: '<?php echo $user_email; ?>',
120 });
121 scope.setTag('site_id', '<?php echo Helper::get_option( Constant::SITE_ID_KEY ); ?>');
122 });
123
124 </script>
125 <!-- PHP errors detection -->
126 <?php
127 echo Helper::wrapper_js_render( 'setup-pregress-jsrender', Helper::get_path_views_folder() . 'components/setup-progress-jsrender.html' );
128 ?>
129 <?php if ( $support_enable && ! $lasso_lite_setting->is_setting_onboarding_page() ) {
130 $user = get_user_by( 'email', $user_email );
131 $user_name = isset( $user->display_name ) ? $user->display_name : get_bloginfo( 'name' );
132 $classic_editor = Helper::is_classic_editor_plugin_active() ? 1 : 0;
133 $email_support = $settings[Enum::EMAIL_SUPPORT] ?? $user_email;
134 $user_hash = $settings[Enum::USER_HASH] ?? '';
135 $lasso_lite_user = 1;
136 if ( Helper::is_lasso_pro_plugin_active()) {
137 $lasso_lite_user = 0;
138 }
139 ?>
140
141 <script>
142 var APP_ID = '<?php echo Constant::LASSO_INTERCOM_APP_ID; // phpcs:ignore ?>';
143 var isClassicEditor = '<?php echo $classic_editor; // phpcs:ignore ?>' == 1 ? true : false;
144 var lasso_lite_user = '<?php echo $lasso_lite_user; // phpcs:ignore ?>' == 1 ? true : false;
145 var intercomParams = {
146 app_id: APP_ID,
147 name: '<?php echo addslashes( $user_name ); // phpcs:ignore ?>',
148 email: '<?php echo $email_support; // phpcs:ignore ?>',
149 lasso_version: parseInt('<?php echo LASSO_LITE_VERSION; // phpcs:ignore ?>'),
150 classic_editor: isClassicEditor,
151 wp_admin_url: '<?php echo admin_url(); // phpcs:ignore ?>',
152 lasso_lite_user: lasso_lite_user,
153 user_hash: '<?php echo $user_hash ?>'
154 };
155 window.intercomSettings = intercomParams;
156 </script>
157 <script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/' + APP_ID;var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();</script>
158 <?php } ?>
159