Canonical: Add $x_redirect_by parameter to wp_redirect() that allows applications doing the redirect to identify themselves.

This complements the `x_redirect_by` filter added in [42408].

Props NathanAtmoz, johnbillion.
Fixes #42313.

git-svn-id: https://develop.svn.wordpress.org/trunk@42633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2018-02-01 15:05:50 +00:00
parent 212c880d71
commit 40f76ae917
2 changed files with 7 additions and 5 deletions

View File

@@ -176,7 +176,8 @@ class Tests_Pluggable extends WP_UnitTestCase {
),
'wp_redirect' => array(
'location',
'status' => 302,
'status' => 302,
'x_redirect_by' => 'WordPress',
),
'wp_sanitize_redirect' => array( 'location' ),
'_wp_sanitize_utf8_in_redirect' => array( 'matches' ),