x_redirect_by
Filters the X-Redirect-By header.
Allows applications to identify themselves when they're doing a redirect.
Usage
add_filter( 'x_redirect_by', 'wp_kama_x_redirect_by_filter', 10, 3 ); /** * Function for `x_redirect_by` filter-hook. * * @param string $x_redirect_by The application doing the redirect. * @param int $status Status code to use. * @param string $location The path to redirect to. * * @return string */ function wp_kama_x_redirect_by_filter( $x_redirect_by, $status, $location ){ // filter... return $x_redirect_by; }
- $x_redirect_by(string)
- The application doing the redirect.
- $status(int)
- Status code to use.
- $location(string)
- The path to redirect to.
Changelog
Since 5.1.0 | Introduced. |
Where the hook is called
wp-includes/pluggable.php 1433
$x_redirect_by = apply_filters( 'x_redirect_by', $x_redirect_by, $status, $location );