Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: admin_referrer_policy

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1420       * Filters the admin referrer policy header value.
1421       *
1422       * @since 4.9.0
1423       * @since 4.9.5 The default value was changed to 'strict-origin-when-cross-origin'.
1424       *
1425       * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
1426       *
1427       * @param string $policy The admin referrer policy header value. Default 'strict-origin-when-cross-origin'.
1428       */
1429      $policy = apply_filters( 'admin_referrer_policy', $policy );
1430
1431      header( sprintf( 'Referrer-Policy: %s', $policy ) );
1432 }
1433
1434 /**
1435  * Outputs JS that reloads the page if the user navigated to it with the Back or Forward button.
1436  *
1437  * Used on the Edit Post and Add New Post screens. Needed to ensure the page is not loaded from browser cache,
1438  * so the post title and editor content are the last saved versions. Ideally this script should run first in the head.