发送引荐来源政策标题,以便不从管理屏幕外部发送引荐来源。

原型

wp_admin_headers()

源文件

路径:wp-admin/includes/misc.php

<?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 ) );
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/wp_admin_headers/