redirect_canonical

redirect_canonical

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.6.2

apply_filters('redirect_canonical') is found 1 times:

  • /wp-includes/canonical.php line 820
    	 *
    	 * @param string $redirect_url  The redirect URL.
    	 * @param string $requested_url The requested URL.
    	 */
    	$redirect_url = apply_filters( 'redirect_canonical', $redirect_url, $requested_url );
    
    	// Yes, again -- in case the filter aborted the request.
    	if ( ! $redirect_url || strip_fragment_from_url( $redirect_url ) === strip_fragment_from_url( $requested_url ) ) {
    		return;
    	}
    
    

See this hook used in plugins: