diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php index f4a4337fd2..42d6dcf44a 100644 --- a/src/wp-includes/canonical.php +++ b/src/wp-includes/canonical.php @@ -824,7 +824,7 @@ function strip_fragment_from_url( $url ) { } /** - * Attempts to guess the correct URL based on query vars + * Attempts to guess the correct URL based on query vars. * * @since 2.3.0 * @@ -838,12 +838,13 @@ function redirect_guess_404_permalink() { /** * Filters whether to do redirect guess of 404 requests. * - * Returning a false value from the filter will disable redirect guess 404 permalink. + * Passing a false value to the filter will disable the URL guessing * and return early. * * @since 5.5.0 * - * @param bool $do_redirect_guess Whether to do redirect guess 404 permalink. Default true. + * @param bool $do_redirect_guess Whether to do redirect guess 404 permalink. + * Default true. */ if ( false === apply_filters( 'do_redirect_guess_404_permalink', true ) ) { return false; @@ -852,11 +853,13 @@ function redirect_guess_404_permalink() { /** * Filters whether to short-circuit redirect guess of 404 requests. * - * Return a non-false value from the filter will short-circuit the handling and return early. + * Passing a non-null value to the filter will effectively short-circuit + * the URL guessing, returning the passed value instead. * * @since 5.5.0 * - * @param bool $pre Whether to short-circuit redirect guess 404 permalink. Default null. + * @param null|string $pre Whether to short-circuit redirect guess 404 permalink. + * Default null to continue with the URL guessing. */ $pre = apply_filters( 'pre_redirect_guess_404_permalink', null ); if ( null !== $pre ) { @@ -868,11 +871,11 @@ function redirect_guess_404_permalink() { /** * Filters whether to do a strict or loose guess. * - * Returning true value from the filter will guess redirect only exact post_name matches. + * Passing a truthy value to the filter will redirect only exact post_name matches. * * @since 5.5.0 * - * @param bool $strict_guess Whether to do a strict/exact guess. Default false. + * @param bool $strict_guess Whether to do a strict/exact guess. Default false. */ $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false );