# http-headers/1.15.0/views/cross-origin-resource-policy.php

HTTP Headers, version 1.15.0. 35 lines.

- Page: https://pluginprobe.com/plugins/http-headers/1.15.0/code/views/cross-origin-resource-policy.php
- Raw: https://pluginprobe.com/plugins/http-headers/1.15.0/raw/views/cross-origin-resource-policy.php
- Modified: 2020-01-26T10:24:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/http-headers/1.15.0/code/views/cross-origin-resource-policy.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH')) {
    exit;
}
?>
<tr>
	<th scope="row">Cross-Origin-Resource-Policy
		<p class="description"><?php _e('The HTTP Cross-Origin-Resource-Policy response header conveys a desire that the browser blocks no-cors cross-origin/cross-site requests to the given resource.', 'http-headers'); ?></p>
	</th>
	<td>
		<fieldset>
			<legend class="screen-reader-text">Cross-Origin-Resource-Policy</legend>
			<?php
            $cross_origin_resource_policy = get_option('hh_cross_origin_resource_policy', 0);
			foreach ($bools as $k => $v)
			{
				?><p><label><input type="radio" class="http-header" name="hh_cross_origin_resource_policy" value="<?php echo $k; ?>"<?php checked($cross_origin_resource_policy, $k); ?> /> <?php echo $v; ?></label></p><?php
			}
			?>
		</fieldset>
	</td>
	<td>
		<?php settings_fields( 'http-headers-corp' ); ?>
		<?php do_settings_sections( 'http-headers-corp' ); ?>
        <select name="hh_cross_origin_resource_policy_value" class="http-header-value"<?php echo $cross_origin_resource_policy == 1 ? NULL : ' readonly'; ?>>
            <?php
            $items = array('same-site', 'same-origin');
            $cross_origin_resource_policy_value = get_option('hh_cross_origin_resource_policy_value');
            foreach ($items as $item) {
                ?><option value="<?php echo $item; ?>"<?php selected($cross_origin_resource_policy_value, $item); ?>><?php echo $item; ?></option><?php
            }
            ?>
        </select>
	</td>
</tr>
```
