PluginProbe
LWS Tools / 2.6
LWS Tools v2.6
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 / optimisation.php

optimisation.php in LWS Tools 2.6, at view/optimisation.php

50 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <form method="POST">
2 <?php wp_nonce_field( 'lws_tk_optimisations', 'nonce_opti_listing_nonce' ); ?>
3 <div class="lws_tk_opti_title">
4 <h2 class="lws_tk_opti_title_text opti"> <?php esc_html_e('Speed and functionnalities optimisations', 'lws-tools'); ?>
5 </h2>
6 <button class="lws_tk_button_opti_save opti" type="submit" name="lws_tk_optimisations"
7 id="lws_tk_optimisations">
8 <img style="vertical-align:sub; margin-right:5px"
9 src="<?php echo esc_url(plugins_url('images/enregistrer.svg', __DIR__))?>"
10 alt="LWS Cache" width="20px" height="20px">
11 <img style="vertical-align:sub; margin-right:5px" class="hidden"
12 src="<?php echo esc_url(plugins_url('images/loading.svg', __DIR__))?>"
13 alt="LWS Cache" width="20px" height="20px">
14 <span><?php esc_html_e('Apply optimisations', 'lws-tools'); ?></span>
15 </button>
16 </div>
17
18 <?php foreach ($opti_list as $key => $opti) : ?>
19 <div class="lws_tk_optipage_bloc_table">
20 <div class="lws_tk_optipage_table">
21 <input type="checkbox" class="lws_tk_checkboxes"
22 id="<?php echo esc_attr($key); ?>"
23 name="lws_tk_optimisation_list[]"
24 value="<?php echo esc_attr($key); ?>" <?php echo get_option('lws_tk_' . $key) ? esc_attr('checked') : '';?>>
25 <label for="<?php echo esc_attr($key); ?>">
26 <?php echo esc_html($opti[0]); ?>
27 </label>
28 <?php if ($key === 'less_revision') : ?>
29 <input style="width:120px"
30 name="<?php echo esc_attr($key . "_revision_number"); ?>"
31 type="number" min="1"
32 value="<?php echo get_option('lws_tk_reduce_revisions_number') ? esc_attr((int)get_option('lws_tk_reduce_revisions_number')) : 1; ?>">
33 <?php endif ?>
34 <?php if ($opti[2]) : ?>
35 <span class="lws_tk_recommended"> <?php esc_html_e('recommended', 'lws-tools');?></span>
36 <?php endif ?>
37 </div>
38 <div class="lws_tk_optipage_table_text">
39 <?php esc_html_e($opti[1]); ?>
40 </div>
41 </div>
42 <?php endforeach ?>
43 </form>
44
45 <script>
46 jQuery('#lws_tk_optimisations').on('click', function() {
47 jQuery('#lws_tk_optimisations').children()[1].classList.remove('hidden')
48 jQuery('#lws_tk_optimisations').children()[0].classList.add('hidden')
49 });
50 </script>