W3cubDocs

/WordPress

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_url

(string) The redirect URL.

$requested_url

(string) The requested URL.

Source

File: wp-includes/canonical.php

View on Trac

Changelog

Version Description
2.3.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/redirect_canonical