| 1 |
<form method="POST"> |
| 2 |
<?php wp_nonce_field( 'lws_tk_security', 'nonce_security_listing_nonce' ); ?> |
| 3 |
<div class="lws_tk_opti_title"> |
| 4 |
<h2 class="lws_tk_opti_title_text"> <?php esc_html_e('Security', 'lws-tools'); ?> |
| 5 |
</h2> |
| 6 |
<button class="lws_tk_button_opti_save" type="submit" name="lws_tk_security" id="lws_tk_security"> |
| 7 |
<img style="vertical-align:sub; margin-right:5px" |
| 8 |
src="<?php echo esc_url(plugins_url('images/enregistrer.svg', __DIR__))?>" |
| 9 |
alt="LWS Cache" width="20px" height="20px"> |
| 10 |
<img style="vertical-align:sub; margin-right:5px" class="hidden" |
| 11 |
src="<?php echo esc_url(plugins_url('images/loading.svg', __DIR__))?>" |
| 12 |
alt="LWS Cache" width="20px" height="20px"> |
| 13 |
<span><?php esc_html_e('Apply modifications', 'lws-tools'); ?></span> |
| 14 |
</button> |
| 15 |
|
| 16 |
</div> |
| 17 |
<?php foreach ($secu_list as $key => $opti) : ?> |
| 18 |
<div class="lws_tk_optipage_bloc_table"> |
| 19 |
<div class="lws_tk_optipage_table"> |
| 20 |
<input type="checkbox" class="lws_tk_checkboxes" |
| 21 |
id="<?php echo esc_attr($key); ?>" |
| 22 |
name="lws_tk_security_list[]" |
| 23 |
value="<?php echo esc_attr($key); ?>" <?php echo get_option('lws_tk_' . $key) ? esc_attr('checked') : '';?>> |
| 24 |
<label for="<?php echo esc_attr($key); ?>"> |
| 25 |
<?php echo esc_html($opti[0]); ?> |
| 26 |
</label> |
| 27 |
<?php if ($key === 'less_revision') : ?> |
| 28 |
<input style="width:120px" |
| 29 |
name="<?php echo esc_attr($key . "_revision_number"); ?>" |
| 30 |
type="number" min="1" |
| 31 |
value="<?php echo get_option('lws_tk_reduce_revisions_number') ? esc_attr((int)get_option('lws_tk_reduce_revisions_number')) : 1; ?>"> |
| 32 |
<?php endif ?> |
| 33 |
<?php if ($opti[2]) : ?> |
| 34 |
<span class="lws_tk_recommended"> <?php esc_html_e('recommended', 'lws-tools');?></span> |
| 35 |
<?php endif ?> |
| 36 |
</div> |
| 37 |
<div class="lws_tk_optipage_table_text"> |
| 38 |
<?php esc_html_e($opti[1]); ?> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<?php endforeach ?> |
| 42 |
<?php if (isset($_SERVER['lwsapitoken']) && explode('/', getcwd())[1] == 'htdocs') :?> |
| 43 |
<div class="lws_tk_opti_title"> |
| 44 |
<h2 class="lws_tk_opti_title_text"> <?php esc_html_e('WP Manager', 'lws-tools'); ?> |
| 45 |
</h2> |
| 46 |
</div> |
| 47 |
<?php foreach ($wp_manager as $key => $manager) : ?> |
| 48 |
<div class="lws_tk_optipage_bloc_table"> |
| 49 |
<div class="lws_tk_optipage_table"> |
| 50 |
<input type="checkbox" class="lws_tk_checkboxes" |
| 51 |
id="<?php echo esc_attr($key); ?>" |
| 52 |
name="lws_tk_wpmanager_list[]" |
| 53 |
value="<?php echo esc_attr($key); ?>" <?php echo $opts[$key] ? esc_attr('checked') : '';?>> |
| 54 |
<label for="<?php echo esc_attr($key); ?>"> |
| 55 |
<?php echo esc_html($manager[0]); ?> |
| 56 |
</label> |
| 57 |
</div> |
| 58 |
<div class="lws_tk_optipage_table_text"> |
| 59 |
<?php esc_html_e($manager[1]); ?> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
<?php endforeach ?> |
| 63 |
<?php endif?> |
| 64 |
|
| 65 |
</form> |
| 66 |
|
| 67 |
<script> |
| 68 |
jQuery('#lws_tk_security').on('click', function() { |
| 69 |
jQuery('#lws_tk_security').children()[1].classList.remove('hidden') |
| 70 |
jQuery('#lws_tk_security').children()[0].classList.add('hidden') |
| 71 |
}); |
| 72 |
</script> |