PluginProbe
HTTP Headers / 1.11.0
HTTP Headers v1.11.0
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 / clear-site-data.php

clear-site-data.php in HTTP Headers 1.11.0, at views/clear-site-data.php

60 lines 1.8 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">Clear-Site-Data
8 <p class="description"><?php _e('The Clear-Site-Data header clears browsing data (cookies, storage, cache) associated with the requesting website. It allows web developers to have more control over the data stored locally by a browser for their origins.', 'http-headers'); ?></p>
9 </th>
10 <td>
11 <fieldset>
12 <legend class="screen-reader-text">Clear-Site-Data</legend>
13 <?php
14 $clear_site_data = get_option('hh_clear_site_data', 0);
15 foreach ($bools as $k => $v)
16 {
17 ?><p><label><input type="radio" class="http-header" name="hh_clear_site_data" value="<?php echo $k; ?>"<?php checked($clear_site_data, $k); ?> /> <?php echo $v; ?></label></p><?php
18 }
19 ?>
20 </fieldset>
21 </td>
22 <td>
23 <?php settings_fields( 'http-headers-csd' ); ?>
24 <?php do_settings_sections( 'http-headers-csd' ); ?>
25 <?php
26 $items = array(
27 'cache' => 'bool',
28 'cookies' => 'bool',
29 'storage' => 'bool',
30 'executionContexts' => 'bool',
31 '*' => 'bool',
32 );
33 ?>
34 <table>
35 <?php
36 $clear_site_data_value = get_option('hh_clear_site_data_value');
37 if (!$clear_site_data_value)
38 {
39 $clear_site_data_value = array();
40 }
41 foreach ($items as $item => $type)
42 {
43 ?>
44 <tr>
45 <td><label for="hh_clear_site_data_value_<?php echo $item; ?>">"<?php echo $item; ?>"</label></td>
46 <td><?php
47 switch ($type) {
48 case 'bool':
49 ?><input type="checkbox" class="http-header-value" name="hh_clear_site_data_value[<?php echo $item; ?>]" id="hh_clear_site_data_value_<?php echo $item; ?>" value="1"<?php checked(array_key_exists($item, $clear_site_data_value), 1, true); ?>><?php
50 break;
51 }
52 ?>
53 </td>
54 </tr>
55 <?php
56 }
57 ?>
58 </table>
59 </td>
60 </tr>