do_redirect_guess_404_permalink

过滤钩子


apply_filters( 'do_redirect_guess_404_permalink', true )
参数
  • (bool)
    $do_redirect_guess
    Whether to attempt to guess a redirect URL
    for a 404 request. Default true.
    Required:
定义位置
  • wp-includes/canonical.php
    , line 900
引入
5.5.0
弃用

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

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

if ( false === apply_filters( 'do_redirect_guess_404_permalink', true ) ) {