PluginProbe
LWS Tools / trunk
LWS Tools vtrunk
trunk 1.0 1.0.1 2.0 2.1 2.1.5 2.2 2.2.1 2.3 2.3.1 2.4 2.4.1 2.4.2 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.6 2.6.1 2.6.1.5 2.6.2 2.6.3 2.6.4
lws-tools / view / notifications.php

notifications.php in LWS Tools trunk, at view/notifications.php

690 lines 41.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php $arr = array('strong' => array()); ?>
2
3 <div class="lws_tk_table">
4 <!-- Update WordPress -->
5 <div class="lws_tk_tab_line lws_tk_tab_border <?php echo $up_to_date == "1" ? esc_attr("lws_tk_tab_border_red") : esc_attr("lws_tk_tab_border_green"); ?>">
6 <?php if ($up_to_date == "1") : ?>
7 <div class="lws_tk_tab">
8 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce_bas.svg') ?>">
9 <span class="lws_tk_basic"><?php echo wp_kses(__('Your current <strong>WordPress</strong> version is outdated and should be updated!', 'lws-tools'), $arr) ?></span>
10 <span class="lws_tk_bulle_version_bad"><?php esc_html($actual_version); ?></span>
11 </div>
12
13 <div class="lws_tk_tab_button">
14 <button class="lws_tk_update_button" name="">
15 <span class="" name="">
16 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj.svg') ?>">
17 <?php esc_html_e('A new version of WordPress is available', 'lws-tools') ?>
18 </span>
19 </button>
20 </div>
21 <?php else : ?>
22 <div class="lws_tk_tab">
23 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
24 <span class="lws_tk_uptodate"><?php echo wp_kses(__('Congrats, your <strong>WordPress</strong> is up to date!', 'lws-tools'), $arr) ?></span>
25 <span class="lws_tk_bulle_version"><?php echo esc_html($actual_version); ?></span>
26 </div>
27
28 <div class="lws_tk_tab_button">
29 <button class="lws_tk_green_update_button" name="">
30 <span class="" name="">
31 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
32 <?php esc_html_e('No updates available', 'lws-tools') ?>
33 </span>
34 </button>
35 </div>
36 <?php endif ?>
37 </div>
38
39 <!-- Update Plugins -->
40 <?php if (count($plugins_update)) : ?>
41 <div class=" lws_tk_tab_border lws_tk_tab_border_red">
42 <div class="lws_tk_tab_line">
43 <div class="lws_tk_tab clickable" onclick="lws_tk_open_submenu(this.children[2])">
44 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce_bas.svg') ?>">
45 <span class=""><?php printf(wp_kses(__('<strong>%d plugin(s)</strong> in need of an update', 'lws-tools'), $arr), count($plugins_update)) ?></span>
46 <img class="lws_tk_image_chevron" width="15px" height="8px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/chevron.svg') ?>">
47 </div>
48
49 <div class="lws_tk_tab_button">
50 <button class="lws_tk_update_button" name="lws_tk_update_all_plugins" onclick="lws_tk_updateAllPlugin(this)">
51 <span class="" name="update">
52 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj.svg') ?>">
53 <?php printf(esc_html__('Update all plugins (%d)', 'lws-tools'), count($plugins_update)) ?>
54 </span>
55 <span class="hidden" name="loading">
56 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading.svg') ?>">
57 <span><?php esc_html_e("Update in progress...", "lws-tools"); ?></span>
58 </span>
59 <span class="hidden" name="validated">
60 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_blanc.svg') ?>">
61 <?php esc_html_e('Updated', 'lws-tools'); ?>
62 </span>
63 </button>
64 </div>
65 </div>
66 <div class="lws_tk_tab_line_submenu">
67 <?php foreach ($plugins_update as $key => $p_update) : ?>
68 <div class="lws_tk_tab_submenu">
69 <?php echo (esc_html($p_update['name'])); ?>
70 <button class="lws_tk_update_element_button" id="<?php echo "lws_tk_update_plugin_specific_" . $p_update['slug'] ?>" name="lws_tk_update_plugin_specific" value="<?php echo (esc_attr($p_update['package'])); ?>" onclick="lws_tk_updatePlugin(this)">
71 <span class="" name="update">
72 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj_red.svg') ?>">
73 <?php esc_html_e('Update this plugin', 'lws-tools') ?>
74 </span>
75 <span class="hidden" name="loading">
76 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading_red.svg') ?>">
77 <span><?php esc_html_e("Update in progress...", "lws-tools"); ?></span>
78 </span>
79 <span class="hidden" name="validated">
80 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_red.svg') ?>">
81 <?php esc_html_e('Updated', 'lws-tools'); ?>
82 </span>
83 </button>
84 </div>
85 <?php endforeach ?>
86 </div>
87 </div>
88
89 <?php else : ?>
90 <div class="lws_tk_tab_line lws_tk_tab_border lws_tk_tab_border_green">
91 <div class="lws_tk_tab">
92 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
93 <span class=""><?php echo wp_kses(__('All your <strong>plugins</strong> are up to date', 'lws-tools'), $arr) ?></span>
94 </div>
95 <div class="lws_tk_tab_button">
96 <button class="lws_tk_green_update_button" name="lws_tk_update_all_plugins">
97 <span class="" name="">
98 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
99 <?php esc_html_e('No updates available', 'lws-tools') ?>
100 </span>
101 </button>
102 </div>
103 </div>
104 <?php endif ?>
105
106 <!-- Update Themes -->
107 <?php if (count($themes_update)) : ?>
108 <div class=" lws_tk_tab_border lws_tk_tab_border_red">
109 <div class="lws_tk_tab_line">
110 <div class="lws_tk_tab clickable" onclick="lws_tk_open_submenu(this.children[2])">
111 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce_bas.svg') ?>">
112 <span class=""><?php printf(wp_kses(__('<strong>%d theme(s)</strong> in need of an update', 'lws-tools'), $arr), count($themes_update)) ?></span>
113 <img class="lws_tk_image_chevron" width="15px" height="8px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/chevron.svg') ?>">
114 </div>
115
116 <div class="lws_tk_tab_button">
117 <button class="lws_tk_update_button" name="lws_tk_update_all_themes" onclick="lws_tk_updateAllTheme(this)">
118 <span class="" name="update">
119 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj.svg') ?>">
120 <?php printf(esc_html__('Update all themes (%d)', 'lws-tools'), count($themes_update)) ?>
121 </span>
122 <span class="hidden" name="loading">
123 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading.svg') ?>">
124 <span><?php esc_html_e("Update in progress...", "lws-tools"); ?></span>
125 </span>
126 <span class="hidden" name="validated">
127 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_blanc.svg') ?>">
128 <?php esc_html_e('Updated', 'lws-tools'); ?>
129 </span>
130 </button>
131 </div>
132 </div>
133 <div class="lws_tk_tab_line_submenu">
134 <?php foreach ($themes_update as $key => $t_update) : ?>
135 <div class="lws_tk_tab_submenu">
136 <?php echo (esc_html($t_update['name'])); ?>
137 <button class="lws_tk_update_element_button" id="<?php echo esc_attr("lws_tk_update_theme_specific_" . $t_update['slug']) ?>" name="lws_tk_update_theme_specific" value="<?php echo (esc_attr($t_update['slug'])); ?>" onclick="lws_tk_updateTheme(this)">
138 <span class="" name="update">
139 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj_red.svg') ?>">
140 <?php esc_html_e('Update this theme', 'lws-tools') ?>
141 </span>
142 <span class="hidden" name="loading">
143 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading_red.svg') ?>">
144 <span><?php esc_html_e("Update in progress...", "lws-tools"); ?></span>
145 </span>
146 <span class="hidden" name="validated">
147 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_red.svg') ?>">
148 <?php esc_html_e('Updated', 'lws-tools'); ?>
149 </span>
150 </button>
151 </div>
152 <?php endforeach ?>
153 </div>
154 </div>
155
156 <?php else : ?>
157 <div class="lws_tk_tab_line lws_tk_tab_border lws_tk_tab_border_green">
158 <div class="lws_tk_tab">
159 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
160 <span class=""><?php echo wp_kses(__('All your <strong>themes</strong> are up to date', 'lws-tools'), $arr) ?></span>
161 </div>
162 <div class="lws_tk_tab_button">
163 <button class="lws_tk_green_update_button" name="lws_tk_update_all_themes">
164 <span class="" name="">
165 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
166 <?php esc_html_e('No updates available', 'lws-tools') ?>
167 </span>
168 </button>
169 </div>
170 </div>
171 <?php endif ?>
172
173 <!-- Unused Plugins -->
174 <?php if (count($unused_plugins)) : ?>
175 <div class=" lws_tk_tab_border lws_tk_tab_border_orange">
176 <div class="lws_tk_tab_line">
177 <div class="lws_tk_tab clickable" onclick="lws_tk_open_submenu(this.children[2])">
178 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/warning.svg') ?>">
179 <span class=""><?php printf(wp_kses(__('<strong>%1$d plugin(s)</strong> are unused out of %2$d', 'lws-tools'), $arr), $inactive_plugins, $count_plugins) ?></span>
180 <img class="lws_tk_image_chevron" width="15px" height="8px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/chevron.svg') ?>">
181 </div>
182
183 <div class="lws_tk_tab_button">
184 <button class="lws_tk_delete_button" name="lws_tk_delete_all_plugins" onclick="lws_tk_deleteAllPlugin(this)">
185 <span class="" name="update">
186 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/supprimer.svg') ?>">
187 <?php printf(esc_html__('Delete all unused plugins (%d)', 'lws-tools'), count($unused_plugins)) ?>
188 </span>
189 <span class="hidden" name="loading">
190 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading.svg') ?>">
191 <span><?php esc_html_e("Deletion in progress...", "lws-tools"); ?></span>
192 </span>
193 <span class="hidden" name="validated">
194 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_blanc.svg') ?>">
195 <?php esc_html_e('Deleted', 'lws-tools'); ?>
196 </span>
197 </button>
198 </div>
199 </div>
200 <div class="lws_tk_tab_line_submenu">
201 <?php foreach ($unused_plugins as $key => $p_delete) : ?>
202 <div class="lws_tk_tab_submenu lws_tk_warning">
203 <?php echo (esc_html($p_delete['name'])); ?>
204 <button class="lws_tk_update_element_button" id="<?php echo "lws_tk_delete_plugin_specific_" . $p_delete['slug'] ?>" name="lws_tk_delete_plugin_specific" value="<?php echo (esc_attr($p_delete['package'])); ?>" onclick="lws_tk_deletePlugin(this)">
205 <span class="" name="update">
206 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/supprimer_red.svg') ?>">
207 <?php esc_html_e('Delete this plugin', 'lws-tools') ?>
208 </span>
209 <span class="hidden" name="loading">
210 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading_red.svg') ?>">
211 <span><?php esc_html_e("Deletion in progress...", "lws-tools"); ?></span>
212 </span>
213 <span class="hidden" name="validated">
214 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_red.svg') ?>">
215 <?php esc_html_e('Deleted', 'lws-tools'); ?>
216 </span>
217 </button>
218 </div>
219 <?php endforeach ?>
220 </div>
221 </div>
222
223 <?php else : ?>
224 <div class="lws_tk_tab_line lws_tk_tab_border lws_tk_tab_border_green">
225 <div class="lws_tk_tab">
226 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
227 <span class=""><?php echo wp_kses(__('No unused <strong>plugins</strong> on this website', 'lws-tools'), $arr) ?></span>
228 </div>
229 <div class="lws_tk_tab_button">
230 <button class="lws_tk_green_update_button" name="">
231 <span class="" name="">
232 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
233 <?php esc_html_e('No unused plugins', 'lws-tools') ?>
234 </span>
235 </button>
236 </div>
237 </div>
238 <?php endif ?>
239
240 <!-- Unused Themes -->
241 <?php if (count($unused_themes)) : ?>
242 <div class=" lws_tk_tab_border lws_tk_tab_border_orange">
243 <div class="lws_tk_tab_line">
244 <div class="lws_tk_tab clickable" onclick="lws_tk_open_submenu(this.children[2])">
245 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/warning.svg') ?>">
246 <span class=""><?php printf(wp_kses(__('<strong>%1$d theme(s)</strong> are unused out of %2$d', 'lws-tools'), $arr), $count_inactive_themes, $count_themes) ?></span>
247 <img class="lws_tk_image_chevron" width="15px" height="8px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/chevron.svg') ?>">
248 </div>
249
250 <div class="lws_tk_tab_button">
251 <button class="lws_tk_delete_button" name="lws_tk_delete_all_themes" onclick="lws_tk_deleteAllTheme(this)">
252 <span class="" name="update">
253 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/supprimer.svg') ?>">
254 <?php printf(esc_html__('Delete all unused themes (%d)', 'lws-tools'), count($unused_themes)) ?>
255 </span>
256 <span class="hidden" name="loading">
257 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading.svg') ?>">
258 <span><?php esc_html_e("Deletion in progress...", "lws-tools"); ?></span>
259 </span>
260 <span class="hidden" name="validated">
261 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_blanc.svg') ?>">
262 <?php esc_html_e('Deleted', 'lws-tools'); ?>
263 </span>
264 </button>
265 </div>
266 </div>
267 <div class="lws_tk_tab_line_submenu">
268 <?php foreach ($unused_themes as $key => $t_delete) : ?>
269 <div class="lws_tk_tab_submenu lws_tk_warning">
270 <?php echo (esc_html($t_delete['name'])); ?>
271 <button class="lws_tk_update_element_button" id="<?php echo "lws_tk_delete_theme_specific_" . $t_delete['slug'] ?>" name="lws_tk_delete_theme_specific" value="<?php echo (esc_attr($t_delete['slug'])); ?>" onclick="lws_tk_deleteTheme(this)">
272 <span class="" name="update">
273 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/supprimer_red.svg') ?>">
274 <?php esc_html_e('Delete this theme', 'lws-tools') ?>
275 </span>
276 <span class="hidden" name="loading">
277 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading_red.svg') ?>">
278 <span><?php esc_html_e("Deletion in progress...", "lws-tools"); ?></span>
279 </span>
280 <span class="hidden" name="validated">
281 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_red.svg') ?>">
282 <?php esc_html_e('Deleted', 'lws-tools'); ?>
283 </span>
284 </button>
285 </div>
286 <?php endforeach ?>
287 </div>
288 </div>
289
290 <?php else : ?>
291 <div class="lws_tk_tab_line lws_tk_tab_border lws_tk_tab_border_green">
292 <div class="lws_tk_tab">
293 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
294 <span class=""><?php echo wp_kses(__('No unused <strong>themes</strong> on this website', 'lws-tools'), $arr) ?></span>
295 </div>
296 <div class="lws_tk_tab_button">
297 <button class="lws_tk_green_update_button" name="">
298 <span class="" name="">
299 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
300 <?php esc_html_e('No unused themes', 'lws-tools') ?>
301 </span>
302 </button>
303 </div>
304 </div>
305 <?php endif ?>
306
307 <!-- Update Translations -->
308 <div class="lws_tk_tab_line lws_tk_tab_border <?php echo $translations_ready ? esc_attr("lws_tk_tab_border_orange") : esc_attr("lws_tk_tab_border_green"); ?>">
309 <?php if ($translations_ready) : ?>
310 <div class="lws_tk_tab">
311 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/warning.svg') ?>">
312 <span class="lws_tk_basic"><?php echo wp_kses(__('You have <strong>translations</strong> in need of an update', 'lws-tools'), $arr) ?></span>
313 </div>
314
315 <div class="lws_tk_tab_button">
316 <button class="lws_tk_update_button" name="lws_tk_update_trad" id="lws_tk_update_trad" onclick="lws_tk_updateTrads(this)">
317 <span class="" name="update">
318 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj.svg') ?>">
319 <?php esc_html_e('Update translations', 'lws-tools') ?>
320 </span>
321 <span class="hidden" name="loading">
322 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading.svg') ?>">
323 <span id="loading_1"><?php esc_html_e("Update in progress...", "lws-tools"); ?></span>
324 </span>
325 <span class="hidden" name="validated">
326 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_blanc.svg') ?>">
327 <?php esc_html_e('Updated', 'lws-tools'); ?>
328 </span>
329 </button>
330 </div>
331 <?php else : ?>
332 <div class="lws_tk_tab">
333 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
334 <span class="lws_tk_uptodate"><?php echo wp_kses(__('All <strong>translations</strong> are up to date', 'lws-tools'), $arr) ?></span>
335 </div>
336
337 <div class="lws_tk_tab_button">
338 <button class="lws_tk_green_update_button" name="">
339 <span class="" name="">
340 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
341 <?php esc_html_e('No updates available', 'lws-tools') ?>
342 </span>
343 </button>
344 </div>
345 <?php endif ?>
346 </div>
347
348 <!-- Update DB Prefix -->
349 <div class="lws_tk_tab_line lws_tk_tab_border <?php echo $db_prefix ? esc_attr("lws_tk_tab_border_red") : esc_attr("lws_tk_tab_border_green"); ?>">
350 <?php if ($db_prefix) : ?>
351 <div class="lws_tk_tab">
352 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce_bas.svg') ?>">
353 <span class="lws_tk_basic"><?php echo wp_kses(__('You are using the default <strong>database prefix</strong>.', 'lws-tools'), $arr) ?></span>
354
355 <span class="lws_tk_tooltip_content">
356 <img class="lws_tk_images_left_table" id="lws_tk_tooltip_prefix>" width="15px" height="15px" style="vertical-align:middle" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/infobulle.svg') ?>">
357 <span>
358 <?php esc_html_e("A database prefix lets WordPress detect which table of a database are theirs to use. By default, it is 'wp_'. In those tables are stocked sensible informations such as your login details, for example, meaning it is the target of hackers. By changing it to a random chain of character, it makes it harder for hacker to access your website.", 'lws-tools'); ?>
359 </span>
360 </span>
361 </div>
362
363 <div class="lws_tk_tab_button">
364 <button class="lws_tk_update_button" data-toggle="modal" data-target="#lwsop_change_prefix_modal" type="button">
365 <span class="" name="update">
366 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj.svg') ?>">
367 <?php esc_html_e('Modify prefix', 'lws-tools') ?>
368 </span>
369 </button>
370 </div>
371 <?php else : ?>
372 <div class="lws_tk_tab">
373 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
374 <span class="lws_tk_uptodate"><?php echo wp_kses(__('You are using a custom <strong>database prefix</strong>', 'lws-tools'), $arr) ?></span>
375 <span class="lws_tk_tooltip_content">
376 <img class="lws_tk_images_left_table" id="lws_tk_tooltip_prefix" width="15px" height="15px" style="vertical-align:middle" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/infobulle.svg') ?>">
377 <span>
378 <?php esc_html_e("A database prefix lets WordPress detect which table of a database are theirs to use. By default, it is 'wp_'. In those tables are stocked sensible informations such as your login details, for example, meaning it is the target of hackers. By changing it to a random chain of character, it makes it harder for hacker to access your website.", 'lws-tools'); ?>
379 </span>
380 </span>
381 </div>
382
383 <div class="lws_tk_tab_button">
384 <button class="lws_tk_green_update_button" name="">
385 <span class="" name="">
386 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
387 <?php esc_html_e('Secured prefix', 'lws-tools') ?>
388 </span>
389 </button>
390 </div>
391 <?php endif ?>
392 </div>
393
394 <!-- SSL -->
395 <div class="lws_tk_tab_line lws_tk_tab_border <?php echo $cert_invalid ? esc_attr("lws_tk_tab_border_red") : esc_attr("lws_tk_tab_border_green"); ?>">
396 <?php if ($cert_invalid) : ?>
397 <div class="lws_tk_tab">
398 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce_bas.svg') ?>">
399 <span class="lws_tk_basic"><?php printf(wp_kses(__('Your <strong>SSL certificate</strong> has expired since %s. Your connexion is not secure.', 'lws-tools'), $arr), $expiration_ssl) ?></span>
400 <span class="lws_tk_tooltip_content">
401 <img class="lws_tk_images_left_table" id="lws_tk_tooltip_SSL" width="15px" height="15px" style="vertical-align:middle" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/infobulle.svg') ?>">
402 <span>
403 <?php esc_html_e('To secure your website, you need to use an HTTPS connection, which allows encoding of the data being exchanged between you and the website. You can get a free certificate easily or use the one provided by LWS with your hosting.', 'lws-tools'); ?>
404 </span>
405 </span>
406 </div>
407
408 <div class="lws_tk_tab_button">
409 <button class="lws_tk_update_button lws_tk_not_clickable" name="">
410 <span class="" name="update">
411 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj.svg') ?>">
412 <?php esc_html_e('Your website is in HTTP', 'lws-tools') ?>
413 </span>
414 </button>
415 </div>
416 <?php else : ?>
417 <div class="lws_tk_tab">
418 <img class="lws_tk_image" width="25px" height="22px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/pouce.svg') ?>">
419 <span class="lws_tk_uptodate"><?php printf(wp_kses(__('<strong>SSL Certificate</strong> valid until %s', 'lws-tools'), $arr), $expiration_ssl) ?></span>
420 <span class="lws_tk_tooltip_content">
421 <img class="lws_tk_images_left_table" id="lws_tk_tooltip_SSL" width="15px" height="15px" style="vertical-align:middle" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/infobulle.svg') ?>">
422 <span>
423 <?php esc_html_e('To secure your website, you need to use an HTTPS connection, which allows encoding of the data being exchanged between you and the website. You can get a free certificate easily or use the one provided by LWS with your hosting.', 'lws-tools'); ?>
424 </span>
425 </span>
426 </div>
427
428 <div class="lws_tk_tab_button">
429 <button class="lws_tk_green_update_button" name="">
430 <span class="" name="">
431 <img class="lws_tk_image" width="17px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/securiser.svg') ?>">
432 <?php esc_html_e('Your website is in HTTPS', 'lws-tools') ?>
433 </span>
434 </button>
435 </div>
436 <?php endif ?>
437 </div>
438 </div>
439
440 <?php if ($db_prefix) : ?>
441 <div class="modal" tabindex="-1" id="lwsop_change_prefix_modal">
442 <div class="modal-dialog">
443 <div class="modal-content">
444 <div class="modal-header">
445 <h5 class="modal-title" style="font-size: 18px;"><?php esc_html_e('Before changing the prefix', 'lws-tools') ?></h5>
446 </div>
447 <div class="modal-body">
448 <p style="font-size: 15px;"><?php esc_html_e('Your website may be down for a few seconds after the prefix has been changed. If you are redirected to an installation page, do not proceed with the installation, otherwise you may lose all your data. If the website is not working after a few minutes, try clearing your website and browser cache.', 'lws-tools') ?></p>
449 </div>
450 <div class="modal-footer">
451 <form method="POST">
452 <?php wp_nonce_field('lws_tk_update_prefix', 'nonce_updating_prefix_nonce'); ?>
453 <button type="button" class=" lws_tk_close_button btn btn-secondary" data-dismiss="modal"><?php esc_html_e('Close', 'lws-tools'); ?></button>
454 <button name="lws_tk_update_prefix" class="lws_tk_update_button" type="submit" onclick="lws_tk_changePrefix(this)">
455 <span class="" name="update">
456 <img class="lws_tk_image" width="19px" height="20px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/maj.svg') ?>">
457 <?php esc_html_e('Modify prefix', 'lws-tools') ?>
458 </span>
459 <span class="hidden" name="loading">
460 <img class="lws_tk_image" width="15px" height="15px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/loading.svg') ?>">
461 <span id="loading_1"><?php esc_html_e("Modifying...", "lws-tools"); ?></span>
462 </span>
463 <span class="hidden" name="validated">
464 <img class="lws_tk_image" width="18px" height="18px" src="<?php echo esc_url(plugin_dir_url(__DIR__) . 'images/check_blanc.svg') ?>">
465 <?php esc_html_e('Modified', 'lws-tools'); ?>
466 </span>
467 </button>
468 </form>
469 </div>
470 </div>
471 </div>
472 </div>
473 <?php endif ?>
474
475 <script>
476 function lws_tk_open_submenu(chevron) {
477 chevron.parentNode.parentNode.nextElementSibling.classList.toggle('lws_tk_submenu_shown');
478 chevron.classList.toggle('lws_tk_chevron_flip');
479 }
480 </script>
481 <script>
482 function lws_tk_updateAllPlugin(button) {
483 button.children[0].classList.add('hidden');
484 button.children[2].classList.add('hidden');
485 button.children[1].classList.remove('hidden');
486 button.classList.remove('lws_tk_validated_button');
487 button.setAttribute('disabled', true);
488 jQuery("button[name^='lws_tk_update_plugin_specific']").prop('disabled', true);
489 var data = {
490 action: "lwstools_updateAllPlugin",
491 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_update_every_plugin')); ?>',
492 };
493 jQuery.post(ajaxurl, data, function(response) {
494 var button = jQuery("button[name^='lws_tk_update_all_plugins'");
495 button.children()[0].classList.add('hidden');
496 button.children()[1].classList.add('hidden');
497 button.children()[2].classList.remove('hidden');
498 button.addClass('lws_tk_validated_button');
499 var childButton = jQuery("button[name^='lws_tk_update_plugin_specific']");
500 childButton.each(function(i) {
501 this.children[0].classList.add('hidden');
502 this.children[2].classList.remove('hidden');
503 });
504 });
505 }
506
507 function lws_tk_updatePlugin(button) {
508 var button_id = button.id;
509 button.children[0].classList.add('hidden');
510 button.children[2].classList.add('hidden');
511 button.children[1].classList.remove('hidden');
512 button.setAttribute('disabled', true);
513 var data = {
514 action: "lwstools_updatePlugin",
515 lws_tk_update_plugin_specific: button.value,
516 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_update_one_plugin')); ?>',
517 };
518 jQuery.post(ajaxurl, data, function(response) {
519 var button = jQuery('#' + button_id);
520 button.children()[0].classList.add('hidden');
521 button.children()[2].classList.remove('hidden');
522 button.children()[1].classList.add('hidden');
523 //location.reload();
524 });
525 }
526
527 function lws_tk_updateAllTheme(button) {
528 button.children[0].classList.add('hidden');
529 button.children[2].classList.add('hidden');
530 button.children[1].classList.remove('hidden');
531 button.classList.remove('lws_tk_validated_button');
532 button.setAttribute('disabled', true);
533 jQuery("button[name^='lws_tk_update_theme_specific']").prop('disabled', true);
534 var data = {
535 action: "lwstools_updateAllTheme",
536 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_update_all_theme')); ?>',
537 };
538 jQuery.post(ajaxurl, data, function(response) {
539 var button = jQuery("button[name^='lws_tk_update_all_themes'");
540 button.children()[0].classList.add('hidden');
541 button.children()[1].classList.add('hidden');
542 button.children()[2].classList.remove('hidden');
543 button.addClass('lws_tk_validated_button');
544 var childButton = jQuery("button[name^='lws_tk_update_themes_specific']");
545 childButton.each(function(i) {
546 this.children[0].classList.add('hidden');
547 this.children[2].classList.remove('hidden');
548 });
549 });
550 }
551
552 function lws_tk_updateTheme(button) {
553 var button_id = button.id;
554 button.children[0].classList.add('hidden');
555 button.children[2].classList.add('hidden');
556 button.children[1].classList.remove('hidden');
557 button.setAttribute('disabled', true);
558 var data = {
559 action: "lwstools_updateTheme",
560 lws_tk_update_theme_specific: button.value,
561 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_update_one_theme')); ?>',
562 };
563 jQuery.post(ajaxurl, data, function(response) {
564 var button = jQuery('#' + button_id);
565 button.children()[0].classList.add('hidden');
566 button.children()[2].classList.remove('hidden');
567 button.children()[1].classList.add('hidden');
568 //location.reload();
569 });
570 }
571
572 function lws_tk_deleteAllPlugin(button) {
573 button.children[0].classList.add('hidden');
574 button.children[2].classList.add('hidden');
575 button.children[1].classList.remove('hidden');
576 button.classList.remove('lws_tk_validated_button');
577 button.setAttribute('disabled', true);
578 jQuery("button[name^='lws_tk_delete_plugin_specific']").prop('disabled', true);
579 var data = {
580 action: "lwstools_deleteAllPlugin",
581 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_delete_all_plugin')); ?>',
582 };
583 jQuery.post(ajaxurl, data, function(response) {
584 var button = jQuery("button[name^='lws_tk_delete_all_plugins'");
585 button.children()[0].classList.add('hidden');
586 button.children()[1].classList.add('hidden');
587 button.children()[2].classList.remove('hidden');
588 button.addClass('lws_tk_validated_button');
589 var childButton = jQuery("button[name^='lws_tk_delete_plugin_specific']");
590 childButton.each(function(i) {
591 this.children[0].classList.add('hidden');
592 this.children[2].classList.remove('hidden');
593 });
594
595 });
596 }
597
598 function lws_tk_deletePlugin(button) {
599 var button_id = button.id;
600 button.children[0].classList.add('hidden');
601 button.children[2].classList.add('hidden');
602 button.children[1].classList.remove('hidden');
603 button.setAttribute('disabled', true);
604 var data = {
605 action: "lwstools_deletePlugin",
606 lws_tk_delete_plugin_specific: button.value,
607 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_delete_one_plugin')); ?>',
608 };
609 jQuery.post(ajaxurl, data, function(response) {
610 var button = jQuery('#' + button_id);
611 button.children()[0].classList.add('hidden');
612 button.children()[2].classList.remove('hidden');
613 button.children()[1].classList.add('hidden');
614 });
615 }
616
617 function lws_tk_deleteAllTheme(button) {
618 button.children[0].classList.add('hidden');
619 button.children[2].classList.add('hidden');
620 button.children[1].classList.remove('hidden');
621 button.classList.remove('lws_tk_validated_button');
622 button.setAttribute('disabled', true);
623 jQuery("button[name^='lws_tk_delete_theme_specific']").prop('disabled', true);
624 var data = {
625 action: "lwstools_deleteAllTheme",
626 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_delete_all_theme')); ?>',
627 };
628 jQuery.post(ajaxurl, data, function(response) {
629 var button = jQuery("button[name^='lws_tk_delete_all_themes'");
630 button.children()[0].classList.add('hidden');
631 button.children()[1].classList.add('hidden');
632 button.children()[2].classList.remove('hidden');
633 button.addClass('lws_tk_validated_button');
634 var childButton = jQuery("button[name^='lws_tk_delete_theme_specific']");
635 childButton.each(function(i) {
636 this.children[0].classList.add('hidden');
637 this.children[2].classList.remove('hidden');
638 });
639
640 });
641 }
642
643 function lws_tk_deleteTheme(button) {
644 var button_id = button.id;
645 button.children[0].classList.add('hidden');
646 button.children[2].classList.add('hidden');
647 button.children[1].classList.remove('hidden');
648 button.setAttribute('disabled', true);
649 var data = {
650 action: "lwstools_deleteTheme",
651 lws_tk_delete_theme_specific: button.value,
652 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_delete_one_theme')); ?>',
653 };
654 jQuery.post(ajaxurl, data, function(response) {
655 var button = jQuery('#' + button_id);
656 button.children()[0].classList.add('hidden');
657 button.children()[2].classList.remove('hidden');
658 button.children()[1].classList.add('hidden');
659 });
660 }
661
662 function lws_tk_updateTrads(button) {
663 var button_id = button.id;
664 button.children[0].classList.add('hidden');
665 button.children[2].classList.add('hidden');
666 button.children[1].classList.remove('hidden');
667 button.classList.remove('lws_tk_validated_button');
668 var data = {
669 action: "lwstools_updateTrads",
670 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce('tools_upgrade_tools_trad')); ?>',
671 };
672 jQuery.post(ajaxurl, data, function(response) {
673 var button = jQuery('#' + button_id);
674 button.children()[0].classList.add('hidden');
675 button.children()[2].classList.remove('hidden');
676 button.children()[1].classList.add('hidden');
677 button.addClass('lws_tk_validated_button');
678 });
679 }
680
681 function lws_tk_updateWP(button) {
682 button.children[0].classList.add('hidden');
683 button.children[1].classList.remove('hidden');
684 }
685
686 function lws_tk_changePrefix(button) {
687 button.children[0].classList.add('hidden');
688 button.children[1].classList.remove('hidden');
689 }
690 </script>