strict_redirect_guess_404_permalink
Filters whether to perform a strict guess for a 404 redirect.
Returning a truthy value from the filter will redirect only exact post_name matches.
Usage
add_filter( 'strict_redirect_guess_404_permalink', 'wp_kama_strict_redirect_guess_404_permalink_filter' );
/**
* Function for `strict_redirect_guess_404_permalink` filter-hook.
*
* @param bool $strict_guess Whether to perform a strict guess.
*
* @return bool
*/
function wp_kama_strict_redirect_guess_404_permalink_filter( $strict_guess ){
// filter...
return $strict_guess;
}
- $strict_guess(true|false)
- Whether to perform a strict guess.
Default: false (loose guess)
Changelog
| Since 5.5.0 | Introduced. |
Where the hook is called
wp-includes/canonical.php 973
$strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false );