A WordPress-centric search engine for devs and theme authors



wp_admin_headers ›

Since4.9.0
Deprecatedn/a
wp_admin_headers ( No parameters )
Defined at:
Codex:

Send a referrer policy header so referrers are not sent externally from administration screens.



Source

function wp_admin_headers() {
	$policy = 'same-origin';

	/**
	 * Filters the admin referrer policy header value. Default 'same-origin'.
	 *
	 * @since 4.9.0
	 * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
	 *
	 * @param string $policy The referrer policy header value.
	 */
	$policy = apply_filters( 'admin_referrer_policy', $policy );

	header( sprintf( 'Referrer-Policy: %s', $policy ) );
}