| 1 |
<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> |
| 2 |
|
| 3 |
<div class="wpo_section wpo_group"> |
| 4 |
|
| 5 |
<h3 class="wpo-first-child"><?php esc_html_e('Gzip compression settings', 'wp-optimize');?></h3> |
| 6 |
<p> |
| 7 |
<span class="dashicons dashicons-info"></span> |
| 8 |
<span><?php |
| 9 |
esc_html_e("This option improves the performance of your website and decreases its loading time.", 'wp-optimize'); |
| 10 |
esc_html_e('When a visitor makes a request, the server compresses the requested resource before sending it leading to smaller file sizes and faster loading.', 'wp-optimize'); |
| 11 |
?> |
| 12 |
<?php printf('<a href="%s" target="_blank">%s</a>', esc_url($info_link), esc_html__('Follow this link to get more information about Gzip compression.', 'wp-optimize')); ?> |
| 13 |
</span> |
| 14 |
</p> |
| 15 |
|
| 16 |
<div id="wpo_gzip_control_panel"> |
| 17 |
<?php echo wp_kses_post($gzip_compression_control_panel); ?> |
| 18 |
</div> |
| 19 |
|
| 20 |
<div class="wpo-fieldgroup"> |
| 21 |
<strong><?php esc_html_e('Gzip compression test', 'wp-optimize'); ?></strong> <span tabindex="0" data-tooltip="<?php esc_attr_e('This section displays the current compression status for different resources such as HTML, CSS, and JS.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> |
| 22 |
<a href="javascript:;" id="wpo_gzip_compression_test_btn" class="wpo-refresh-button"><span class="dashicons dashicons-image-rotate"></span><?php esc_html_e('Test again', 'wp-optimize'); ?></a> |
| 23 |
<br> |
| 24 |
<p id="wpo_gzip_compression_details"> |
| 25 |
<?php echo $compression_test_results_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already escaped ?> |
| 26 |
</p> |
| 27 |
</div> |
| 28 |
|
| 29 |
<div id="wpo_gzip_compression_error_message"> |
| 30 |
<?php |
| 31 |
if (is_wp_error($wpo_gzip_compression_enabled)) { |
| 32 |
echo esc_html($wpo_gzip_compression_enabled->get_error_message()); |
| 33 |
} |
| 34 |
?> |
| 35 |
</div> |
| 36 |
<pre id="wpo_gzip_compression_output" style="display: none;"></pre> |
| 37 |
|
| 38 |
</div> |
| 39 |
|