x_redirect_by WordPress Filter Hook

The x_redirect_by hook is a powerful tool for customizing the behavior of your WordPress site. This hook allows you to specify a custom URL to redirect users to, based on certain conditions. For example, you could use this hook to redirect users to a custom page if they are trying to access a page that does not exist.

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

Filters the X-Redirect-By header.


Description

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


Top ↑

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

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.