pre_redirect_guess_404_permalink WordPress Filter Hook

The pre_redirect_guess_404_permalink hook is used to guess the correct URL for a given 404 request. It is called before the redirect is attempted, and can be used to customize the behavior of the redirect.

apply_filters( 'pre_redirect_guess_404_permalink', null|string|false $pre ) #

Short-circuits the redirect URL guessing for 404 requests.


Description

Returning a non-null value from the filter will effectively short-circuit the URL guessing, returning the passed value instead.


Top ↑

Parameters

$pre

(null|string|false)Whether to short-circuit guessing the redirect for a 404. Default null to continue with the URL guessing.


Top ↑

Source

File: wp-includes/canonical.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.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.