apply_filters( 'x_redirect_by', string $x_redirect_by, int $status, string $location )

Filters the X-Redirect-By header.


Description Description

Allows applications to identify themselves when they’re doing a redirect.


Top ↑

Parameters Parameters

$x_redirect_by

(string) The application doing the redirect.

$status

(int) Status code to use.

$location

(string) The path to redirect to.


Top ↑

Source Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog Changelog

Changelog
Version Description
5.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by ramon fincken

    a word of caution: it SHOULD return a string.

    If you don’t return a string .. the header will not be shown
    This can be seen in the pluggable.php wp_redirect function

    		$x_redirect_by = apply_filters( 'x_redirect_by', $x_redirect_by, $status, $location );
    		if ( is_string( $x_redirect_by ) ) {
    			header( "X-Redirect-By: $x_redirect_by" );
    		}
    

You must log in before being able to contribute a note or feedback.