wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_admin_headers › WordPress Function
Since4.9.0
Deprecatedn/a
› wp_admin_headers ( No parameters )
| Defined at: |
|
| Codex: | |
| Change Log: |
|
Sends a referrer policy header so referrers are not sent externally from administration screens.
Related Functions: wp_admin_bar_header, wp_admin_bar_render, wp_admin_css, wp_shortlink_header, show_admin_bar
Source
function wp_admin_headers() {
$policy = 'strict-origin-when-cross-origin';
/**
* Filters the admin referrer policy header value.
*
* @since 4.9.0
* @since 4.9.5 The default value was changed to 'strict-origin-when-cross-origin'.
*
* @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy
*
* @param string $policy The admin referrer policy header value. Default 'strict-origin-when-cross-origin'.
*/
$policy = apply_filters( 'admin_referrer_policy', $policy );
header( sprintf( 'Referrer-Policy: %s', $policy ) );
}