apply_filters( ‘redirect_canonical’, string $redirect_url, string $requested_url )

Filters the canonical redirect URL.

Description

Returning false to this filter will cancel the redirect.

Parameters

$redirect_urlstring
The redirect URL.
$requested_urlstring
The requested URL.

Source

$redirect_url = apply_filters( 'redirect_canonical', $redirect_url, $requested_url );

Changelog

VersionDescription
2.3.0Introduced.

User Contributed Notes

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