wphooks.info - admin_referrer_policy

admin_referrer_policy

(trunk - 5.0-alpha-42177)

*** New in trunk ***

The hook occurs in the following file:

wp-admin/includes/misc.php:
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
	$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 ) );
}

/**
 * Outputs JS that reloads the page if the user navigated to it with the Back or Forward button.
 *
 * Used on the Edit Post and Add New Post screens. Needed to ensure the page is not loaded from browser cache,
 * so the post title and editor content are the last saved versions. Ideally this script should run first in the head.