From 1aa329d0600f9976982692bc5187d1e675361322 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 26 Jun 2020 16:14:30 +0000 Subject: [PATCH] Docs: Reword inline docs for better readability and clarity. This improves the wording of the inline documentation for `redirect_guess_404_permalink()` and the related filters introduced in [47878]. Previously [47878,47885] See #16557. git-svn-id: https://develop.svn.wordpress.org/trunk@48182 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/canonical.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php index 2d776e8707..6f9e3f9204 100644 --- a/src/wp-includes/canonical.php +++ b/src/wp-includes/canonical.php @@ -835,7 +835,7 @@ function strip_fragment_from_url( $url ) { } /** - * Attempts to guess the correct URL based on query vars. + * Attempts to guess the correct URL for a 404 request based on query vars. * * @since 2.3.0 * @@ -847,22 +847,22 @@ function redirect_guess_404_permalink() { global $wpdb; /** - * Filters whether to do redirect guess of 404 requests. + * Filters whether to attempt to guess a redirect URL for a 404 request. * * 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 attempt to guess a redirect URL + * for a 404 request. Default is true. */ if ( false === apply_filters( 'do_redirect_guess_404_permalink', true ) ) { return false; } /** - * Filters whether to short-circuit redirect guess of 404 requests. + * Filters whether to short-circuit redirect URL guessing for 404 requests. * * Passing a non-null value to the filter will effectively short-circuit * the URL guessing, returning the passed value instead. @@ -878,15 +878,14 @@ function redirect_guess_404_permalink() { } if ( get_query_var( 'name' ) ) { - /** - * Filters whether to do a strict or loose guess. + * Filters whether to perform a strict or loose guess. * * 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 perform a strict/exact guess. Default false (loose guess). */ $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false );