Docs: Correct `@param` type for `pre_redirect_guess_404_permalink` filter.

Improve filter documentation for consistency with other similar short-circuit filters in core.

Follow-up to [47878].

See #16557.
Built from https://develop.svn.wordpress.org/trunk@47885


git-svn-id: http://core.svn.wordpress.org/trunk@47659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-06-02 16:23:11 +00:00
parent ba92ed7615
commit 3fd1fe298a
2 changed files with 11 additions and 8 deletions

View File

@ -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 );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-47884';
$wp_version = '5.5-alpha-47885';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.