PluginProbe
HTTP Headers / 1.14.1
HTTP Headers v1.14.1
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 / access-control-expose-headers.php

access-control-expose-headers.php in HTTP Headers 1.14.1, at views/access-control-expose-headers.php

74 lines 3.1 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">Access-Control-Expose-Headers
8 <p class="description"><?php _e('The Access-Control-Expose-Headers response header brings information about headers that browsers could allow accessing.', 'http-headers'); ?></p>
9 </th>
10 <td>
11 <fieldset>
12 <legend class="screen-reader-text">Access-Control-Expose-Headers</legend>
13 <?php
14 $access_control_expose_headers = get_option('hh_access_control_expose_headers', 0);
15 foreach ($bools as $k => $v)
16 {
17 ?><p><label><input type="radio" class="http-header" name="hh_access_control_expose_headers" value="<?php echo $k; ?>"<?php checked($access_control_expose_headers, $k); ?> /> <?php echo $v; ?></label></p><?php
18 }
19 ?>
20 </fieldset>
21 </td>
22 <td>
23 <?php settings_fields( 'http-headers-aceh' ); ?>
24 <?php do_settings_sections( 'http-headers-aceh' ); ?>
25
26 <?php
27 $access_control_expose_headers_value = get_option('hh_access_control_expose_headers_value');
28 if (!$access_control_expose_headers_value)
29 {
30 $access_control_expose_headers_value = array();
31 }
32 ?>
33 <table><tbody><tr>
34 <?php
35 $i = 0;
36 array_unshift($headers_list, '*');
37 foreach ($headers_list as $item) {
38 if (in_array($item, $cors_safe_response_headers) || in_array($item, $cors_safe_request_headers))
39 {
40 continue;
41 }
42 if ($i % 3 === 0) {
43 ?></tr><tr><?php
44 }
45 ?><td><label><input type="checkbox" class="http-header-value" name="hh_access_control_expose_headers_value[<?php echo $item; ?>]" value="1"<?php echo !array_key_exists($item, $access_control_expose_headers_value) ? NULL : ' checked'; ?><?php echo $access_control_expose_headers == 1 ? NULL : ' readonly'; ?> /> <?php echo $item; ?></label></td><?php
46 $i += 1;
47 }
48 ?>
49 </tr>
50 </tbody></table>
51 <table><tbody>
52 <?php
53 $access_control_expose_headers_custom = get_option('hh_access_control_expose_headers_custom');
54 if (is_array($access_control_expose_headers_custom))
55 {
56 foreach ($access_control_expose_headers_custom as $header)
57 {
58 ?>
59 <tr>
60 <td><input type="text" name="hh_access_control_expose_headers_custom[]" class="http-header-value" size="35" value="<?php echo esc_attr($header); ?>"<?php echo $access_control_expose_headers == 1 ? NULL : ' readonly'; ?> /></td>
61 <td><button type="button" class="button button-small hh-btn-delete-ac" title="<?php esc_attr_e('Delete', 'http-headers'); ?>">x</button></td>
62 </tr>
63 <?php
64 }
65 }
66 ?>
67 <tr>
68 <td colspan="2">
69 <button type="button" class="button hh-btn-add-ac" data-name="hh_access_control_expose_headers_custom[]">+ <?php _e('Add header', 'http-headers'); ?></button>
70 </td>
71 </tr>
72 </tbody></table>
73 </td>
74 </tr>