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
This commit is contained in:
Jonathan Desrosiers 2020-06-26 16:14:30 +00:00
parent 4c29c4eb11
commit 1aa329d060

View File

@ -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 * @since 2.3.0
* *
@ -847,22 +847,22 @@ function redirect_guess_404_permalink() {
global $wpdb; 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 * Passing a false value to the filter will disable the URL guessing
* and return early. * and return early.
* *
* @since 5.5.0 * @since 5.5.0
* *
* @param bool $do_redirect_guess Whether to do redirect guess 404 permalink. * @param bool $do_redirect_guess Whether to attempt to guess a redirect URL
* Default true. * for a 404 request. Default is true.
*/ */
if ( false === apply_filters( 'do_redirect_guess_404_permalink', true ) ) { if ( false === apply_filters( 'do_redirect_guess_404_permalink', true ) ) {
return false; 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 * Passing a non-null value to the filter will effectively short-circuit
* the URL guessing, returning the passed value instead. * the URL guessing, returning the passed value instead.
@ -878,15 +878,14 @@ function redirect_guess_404_permalink() {
} }
if ( get_query_var( 'name' ) ) { 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. * Passing a truthy value to the filter will redirect only exact post_name matches.
* *
* @since 5.5.0 * @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 ); $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false );