On this page
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
File: wp-includes/canonical.php. View all references
$redirect_url = apply_filters( 'redirect_canonical', $redirect_url, $requested_url );
Related
Used By
| Used By | Description |
|---|---|
| redirect_canonical() wp-includes/canonical.php | Redirects incoming links to the proper URL based on the site url. |
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/redirect_canonical