do_redirect_guess_404_permalink WordPress Filter Hook

The do_redirect_guess_404_permalink WordPress hook is used to guess the correct URL for a given permalink. This is useful for cases where the permalink has been changed or the URL has been updated.

apply_filters( 'do_redirect_guess_404_permalink', bool $do_redirect_guess ) #

Filters whether to attempt to guess a redirect URL for a 404 request.


Description

Returning a false value from the filter will disable the URL guessing and return early without performing a redirect.


Top ↑

Parameters

$do_redirect_guess

(bool)Whether to attempt to guess a redirect URL for a 404 request. Default true.


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.