strict_redirect_guess_404_permalink WordPress Filter Hook

This hook is called when WordPress is unable to find a post or page at the given permalink. It is used to guess the correct permalink for 404 errors.

apply_filters( 'strict_redirect_guess_404_permalink', bool $strict_guess ) #

Filters whether to perform a strict guess for a 404 redirect.


Description

Returning a truthy value from the filter will redirect only exact post_name matches.


Top ↑

Parameters

$strict_guess

(bool)Whether to perform a strict guess. Default false (loose guess).


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.