PluginProbe
HTTP Headers / 1.10.5
HTTP Headers v1.10.5
1.19.5 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.12.0 1.12.1 1.12.2 1.13.0 1.13.1 1.13.2 1.13.3 1.13.4 1.14.0 1.14.1 1.14.2 1.15.0 All 60 releases
http-headers / views / content-encoding.php

content-encoding.php in HTTP Headers 1.10.5, at views/content-encoding.php

92 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit;
4 }
5 ?>
6 <tr>
7 <th scope="row">Content-Encoding
8 <p class="description"><?php _e('Compression is an important way to increase the performance of a Web site. For some documents, size reduction of up to 70% lowers the bandwidth capacity needs.', 'http-headers'); ?></p>
9 </th>
10 <td>
11 <fieldset>
12 <legend class="screen-reader-text">Content-Encoding</legend>
13 <?php
14 $content_encoding = get_option('hh_content_encoding', 0);
15 foreach ($bools as $k => $v)
16 {
17 ?><p><label><input type="radio" class="http-header" name="hh_content_encoding" value="<?php echo $k; ?>"<?php checked($content_encoding, $k); ?> /> <?php echo $v; ?></label></p><?php
18 }
19 ?>
20 </fieldset>
21 </td>
22 <td>
23 <?php settings_fields( 'http-headers-ce' ); ?>
24 <?php do_settings_sections( 'http-headers-ce' ); ?>
25 <table>
26 <tbody><tr>
27 <th colspan="2"><?php _e('By content type', 'http-headers'); ?></th>
28 </tr><tr>
29 <?php
30 $items = array(
31 'application/javascript',
32 'application/x-javascript',
33 'application/json',
34 'application/ld+json',
35 'application/manifest+json',
36 'application/rdf+xml',
37 'application/rss+xml',
38 'application/schema+json',
39 'application/vnd.geo+json',
40 'application/x-web-app-manifest+json',
41 'application/vnd.ms-fontobject',
42 'application/x-font-ttf',
43 'application/xhtml+xml',
44 'application/xml',
45 'font/opentype',
46 'font/eot',
47 'image/bmp',
48 'image/svg+xml',
49 'image/x-icon',
50 'image/vnd.microsoft.icon',
51 'text/javascript',
52 'text/css',
53 'text/html',
54 'text/plain',
55 'text/x-component',
56 'text/xml',
57 );
58 $content_encoding_value = get_option('hh_content_encoding_value');
59 if (!$content_encoding_value) {
60 $content_encoding_value = array();
61 }
62 foreach ($items as $i => $item) {
63 if ($i > 0 && $i % 2 === 0) {
64 ?></tr><tr><?php
65 }
66 ?><td><label><input type="checkbox" class="http-header-value" name="hh_content_encoding_value[<?php echo $item; ?>]" value="1"<?php echo !array_key_exists($item, $content_encoding_value) ? NULL : ' checked'; ?><?php echo $content_encoding == 1 ? NULL : ' readonly'; ?> /> <?php echo $item; ?></label></td><?php
67 }
68 ?>
69 </tr>
70
71 <tr>
72 <th colspan="2"><?php _e('By extension', 'http-headers'); ?></th>
73 </tr>
74 <tr>
75 <?php
76 $content_encoding_ext = get_option('hh_content_encoding_ext');
77 if (!$content_encoding_ext) {
78 $content_encoding_ext = array();
79 }
80 $items = array('php', 'html', 'js', 'css', 'json', 'xml', 'svg', 'txt', 'bmp', 'ico', 'ttf', 'otf', 'eot');
81 foreach ($items as $i => $item) {
82 if ($i > 0 && $i % 2 === 0) {
83 ?></tr><tr><?php
84 }
85 ?><td><label><input type="checkbox" class="http-header-value" name="hh_content_encoding_ext[<?php echo $item; ?>]" value="1"<?php echo !array_key_exists($item, $content_encoding_ext) ? NULL : ' checked'; ?><?php echo $content_encoding == 1 ? NULL : ' readonly'; ?> /> *.<?php echo $item; ?></label></td><?php
86 }
87 ?>
88 </tr>
89
90 </tbody></table>
91 </td>
92 </tr>