PluginProbe
HTTP Headers / 1.12.2
HTTP Headers v1.12.2
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 / cookie-security.php

cookie-security.php in HTTP Headers 1.12.2, at views/cookie-security.php

35 lines 1.5 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">Cookie security
8 <p class="description"><?php _e('A secure cookie is only sent to the server with a encrypted request over the HTTPS protocol.', 'http-headers'); ?></p>
9 <p class="description"><?php _e("To prevent cross-site scripting (XSS) attacks, HttpOnly cookies are inaccessible to JavaScript's Document.cookie API; they are only sent to the server.", 'http-headers'); ?></p>
10 </th>
11 <td>
12 <fieldset>
13 <legend class="screen-reader-text">Cookie security</legend>
14 <?php
15 $cookie_security = get_option('hh_cookie_security', 0);
16 foreach ($bools as $k => $v)
17 {
18 ?><p><label><input type="radio" class="http-header" name="hh_cookie_security" value="<?php echo $k; ?>"<?php checked($cookie_security, $k); ?> /> <?php echo $v; ?></label></p><?php
19 }
20 ?>
21 </fieldset>
22 </td>
23 <td>
24 <?php settings_fields( 'http-headers-cose' ); ?>
25 <?php do_settings_sections( 'http-headers-cose' ); ?>
26 <?php
27 $items = array('Secure', 'HttpOnly');
28 $cookie_security_value = get_option('hh_cookie_security_value');
29 foreach ($items as $item)
30 {
31 ?><p><label><input type="checkbox" class="http-header-value" name="hh_cookie_security_value[<?php echo $item; ?>]" value="1"<?php echo !is_array($cookie_security_value) || !array_key_exists($item, $cookie_security_value) ? NULL : ' checked'; ?><?php echo $cookie_security == 1 ? NULL : ' readonly'; ?> /> <?php echo $item; ?></label></p><?php
32 }
33 ?>
34 </td>
35 </tr>