PluginProbe ʕ •ᴥ•ʔ
10Web Booster – Website speed optimization, Cache & Page Speed optimizer / trunk
10Web Booster – Website speed optimization, Cache & Page Speed optimizer vtrunk
2.33.0 2.30.5 2.30.7 2.30.9 2.31.10 2.31.8 2.32.11 2.32.21 2.32.3 2.32.4 2.32.7 2.6.31 2.6.40 2.6.42 2.6.7 2.7.37 2.7.44 2.7.47 2.8.18 2.8.19 2.8.32 2.8.34 2.8.35 2.9.23 2.9.24 2.9.25 2.9.27 v2.27.4 trunk 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.17 2.0.18 2.0.21 2.0.22 2.0.25 2.0.26 2.0.27 2.0.3 2.0.7 2.0.9 2.10.46 2.10.65 2.10.66 2.10.68 2.11.41 2.11.42 2.11.43 2.12.15 2.12.21 2.12.22 2.12.23 2.12.26 2.13.37 2.13.40 2.13.41 2.13.42 2.13.44 2.13.45 2.13.47 2.14.49 2.14.50 2.15.18 2.17.21 2.17.23 2.18.17 2.19.44 2.19.45 2.19.46 2.19.49 2.2.12 2.2.15 2.2.16 2.2.18 2.2.8 2.20.31 2.20.32 2.20.33 2.21.11 2.21.12 2.21.16 2.21.25 2.22.32 2.23.13 2.23.15 2.23.16 2.23.18 2.24.12 2.24.14 2.24.18 2.25.14 2.26.6 2.28.10 2.28.13 2.28.14 2.28.7 2.29.1 2.29.2 2.29.3 2.3.0 2.3.1 2.3.2 2.3.3 2.30.18
tenweb-speed-optimizer / views / deactivation_popup.php
tenweb-speed-optimizer / views Last commit date
templates 2 years ago autoupdate_banner.php 2 years ago cdn_page.php 2 years ago customer_support.php 2 years ago deactivation_popup.php 2 years ago post_custom_column.php 2 years ago referral_program_page.php 2 years ago settings_basic.php 11 months ago settings_connect.php 3 years ago settings_view.php 1 year ago two_black_friday.php 3 years ago two_header.php 3 years ago white_label_view.php 2 years ago
deactivation_popup.php
197 lines
1 <?php
2 $two_domain_id = get_site_option('tenweb_domain_id');
3 $two_manage_url = trim(TENWEB_DASHBOARD, '/') . '/websites/' . $two_domain_id . '/booster/frontend' . '?from_plugin=' . \TenWebOptimizer\OptimizerUtils::FROM_PLUGIN;
4 $two_contact_link = $two_manage_url . '&open=livechat';
5 $two_disconnect_nonce = wp_create_nonce('two_disconnect_nonce');
6 $two_disconnect_button_text = __('Deactivate', 'tenweb-speed-optimizer');
7
8 $two_so_organization_name = get_option('two_so_organization_name');
9 $two_so_organization_support_url = get_option('two_so_organization_support_url');
10
11 if (!empty($two_so_organization_name) && !empty($two_so_organization_support_url)) {
12 $two_contact_link = $two_so_organization_support_url;
13 }
14 $query_args = [
15 'action' => 'deactivate',
16 'plugin' => TENWEB_SO_BASENAME,
17 '_wpnonce' => wp_create_nonce('deactivate-plugin_' . TENWEB_SO_BASENAME)
18 ];
19
20 // disconnect plugin only when image-optimizer is not active, otherwise only deactivate it
21 if (!is_plugin_active('image-optimizer-wd/tenweb-image-optimizer.php')) {
22 $query_args['two_disconnect'] = 1;
23 $query_args['nonce'] = $two_disconnect_nonce;
24 $two_disconnect_button_text = __('Disconnect & deactivate', 'tenweb-speed-optimizer');
25 }
26 define('TENWEB_SO_DISCONNECT_DEACTIVATE_URL', add_query_arg(
27 $query_args,
28 admin_url('plugins.php')
29 ));
30 global $TwoSettings;
31
32 if ('on' == $TwoSettings->get_settings('two_test_mode')) {
33 $two_popup_title = __('You’re about to deactivate ' . TWO_SO_ORGANIZATION_NAME . ' Booster', 'tenweb-speed-optimizer');
34 $two_popup_p1 = __(TWO_SO_ORGANIZATION_NAME . ' Booster is currently working in Test mode.', 'tenweb-speed-optimizer');
35 $two_popup_p2 = __('If you’re still having issues and no longer wish to optimize your website with ' . TWO_SO_ORGANIZATION_NAME . ' Booster, you can disconnect your site and deactivate the plugin.', 'tenweb-speed-optimizer');
36 $two_button_text = __('STAY CONNECTED & RESOLVE', 'tenweb-speed-optimizer');
37 $two_button_class = 'two-button-cancel';
38 } else {
39 $two_popup_title = __('Try this before deactivating ' . TWO_SO_ORGANIZATION_NAME . ' Booster', 'tenweb-speed-optimizer');
40 $two_popup_p1 = sprintf(__('If you’re having issues with your optimized website, deactivating ' . TWO_SO_ORGANIZATION_NAME . ' Booster is not the only solution. We recommend enabling Test mode and %s to resolve the issue.', 'tenweb-speed-optimizer'), '<a href="' . esc_url($two_contact_link) . '" target="_blank">' . __('contacting our team', 'tenweb-speed-optimizer') . '</a>');
41 $two_popup_p2 = sprintf(__('Test mode temporarily disables ' . TWO_SO_ORGANIZATION_NAME . ' Booster for website visitors so you can perform various tests without affecting the live site. To preview optimized version in Test mode, append %s. Choose how you want to proceed.', 'tenweb-speed-optimizer'), '<b>?twbooster=1</b>');
42 $two_button_text = __('Enable test mode', 'tenweb-speed-optimizer');
43 $two_button_class = 'two-button-test-mode';
44 }
45 ?>
46 <style>
47 .two-button {
48 border-radius: 6px;
49 padding: 10px 24px;
50 text-align: center;
51 text-decoration: none;
52 width: 260px;
53 font-size: 14px;
54 line-height: 20px;
55 font-weight: 600;
56 text-transform: uppercase;
57 color: #FFFFFF;
58 display: inline-block;
59 box-sizing: border-box;
60 margin: 0 0 0 20px;
61 }
62 .two-button:hover {
63 opacity: 0.6;
64 }
65 .two-deactivate-popup * {
66 box-sizing: border-box;
67 font-family: Open Sans, sans-serif;
68 }
69 .two-deactivate-popup {
70 position: fixed;
71 top: 0; right: 0; bottom: 0; left: 0;
72 background-color: #323A4534;
73 display: none;
74 flex-direction: column;
75 justify-content: center;
76 z-index: 9999;
77 color: #323A45;
78 font-family: sans-serif;
79 }
80 .two-deactivate-popup.open {
81 display: flex;
82 }
83 .two-deactivate-popup-body {
84 width: 740px;
85 margin: 0 auto;
86 background-color: #FFFFFF;
87 border-radius: 13px;
88 display: flex;
89 flex-direction: column;
90 align-self: center;
91 padding: 35px 50px;
92 font-size: 16px;
93 line-height: 24px;
94 justify-content: space-between;
95 position: relative;
96 }
97 .two-deactivate-popup-content {
98 max-width: 600px;
99 flex-grow: 1;
100 margin: 10px 0 15px 0;
101 }
102 .two-deactivate-popup-content>p {
103 font-size: 16px;
104 line-height: 24px;
105 margin: 0 0 15px 0;
106 }
107 .two-deactivate-popup-content>p a, .two-deactivate-popup-content>p a:hover {
108 color: #2160B5;
109 }
110 .two-deactivate-popup-title {
111 font-size: 24px;
112 line-height: 34px;
113 font-weight: 800;
114 }
115 .two-deactivate-popup-button, .two-deactivate-popup-button:hover {
116 background-color: #22B339;
117 color: #FFFFFF;
118 }
119 .two-button-disconnect, .two-button-disconnect:hover {
120 background-color: #E6E7E8;
121 color: #323A45;
122 }
123 .two-deactivate-popup-button-container {
124 display: flex;
125 flex-direction: row;
126 justify-content: end;
127 }
128 .two-close-img {
129 position: absolute;
130 top: 15px;
131 right: 15px;
132 cursor: pointer;
133 }
134 @media screen and (max-width: 767px){
135 .two-deactivate-popup-body {
136 width: 100%;
137 height: auto;
138 top: 35px;
139 border-radius: 0;
140 padding: 35px 20px;
141 }
142 }
143 </style>
144 <script>
145 jQuery(document).ready(function() {
146 jQuery('tr[data-plugin="tenweb-speed-optimizer/tenweb_speed_optimizer.php"] span.deactivate a').on('click', function() {
147 jQuery('.two-deactivate-popup').appendTo('body').addClass('open');
148 return false;
149 });
150 jQuery('.two-button-cancel, .two-close-img').on('click', function() {
151 jQuery('.two-deactivate-popup').removeClass('open');
152 return false;
153 });
154 jQuery('.two-button-test-mode').on('click', function() {
155 jQuery.ajax({
156 type: "POST",
157 url: ajaxurl,
158 dataType: 'json',
159 data: {
160 action: "two_update_setting",
161 nonce: "<?php echo esc_js(wp_create_nonce('two_ajax_nonce')); ?>",
162 name: "two_test_mode",
163 value: "on",
164 }
165 }).done(function (data) {
166 if ( true == data.success ) {
167 window.location.href = "<?php echo esc_url($two_manage_url); ?>";
168 } else {
169 alert( 'Something went wrong. Could not enable test mode.' );
170 }
171 });
172 return false;
173 });
174 });
175 </script>
176 <div class="two-deactivate-popup">
177 <div class="two-deactivate-popup-body">
178 <div class="two-deactivate-popup-title">
179 <?php echo esc_html($two_popup_title); ?>
180 </div>
181 <div class="two-deactivate-popup-content">
182 <p>
183 <?php echo wp_kses_post($two_popup_p1); ?>
184 </p>
185 <p>
186 <?php echo wp_kses_post($two_popup_p2); ?>
187 </p>
188 </div>
189 <div class="two-deactivate-popup-button-container">
190 <a href="<?php echo esc_url(TENWEB_SO_DISCONNECT_DEACTIVATE_URL); ?>" class="two-button two-button-disconnect"><?php echo esc_html($two_disconnect_button_text); ?></a>
191 <a href="#" class="two-button two-deactivate-popup-button <?php echo esc_attr($two_button_class); ?>"><?php echo esc_html($two_button_text); ?></a>
192 </div>
193 <img src="<?php echo esc_url(TENWEB_SO_URL); ?>/assets/images/close.svg" alt="Close" class="two-close-img" />
194 </div>
195 </div>
196 <?php
197