Uses
Uses | Description |
---|---|
wp-admin/includes/misc.php: admin_referrer_policy | Filters the admin referrer policy header value. |
wp-includes/plugin.php: apply_filters() | Calls the callback functions that have been added to a filter hook. |
Send a referrer policy header so referrers are not sent externally from administration screens.
File: wp-admin/includes/misc.php
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/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 ) ); }
Version | Description |
---|---|
4.9.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_admin_headers