WordPress.org

Make WordPress Core

Changeset 48182


Ignore:
Timestamp:
06/26/2020 04:14:30 PM (15 months ago)
Author:
desrosj
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/canonical.php

    r48166 r48182  
    836836
    837837/**
    838  * Attempts to guess the correct URL based on query vars.
     838 * Attempts to guess the correct URL for a 404 request based on query vars.
    839839 *
    840840 * @since 2.3.0
     
    848848
    849849    /**
    850      * Filters whether to do redirect guess of 404 requests.
     850     * Filters whether to attempt to guess a redirect URL for a 404 request.
    851851     *
    852852     * Passing a false value to the filter will disable the URL guessing
     
    855855     * @since 5.5.0
    856856     *
    857      * @param bool $do_redirect_guess Whether to do redirect guess 404 permalink.
    858      *                                Default true.
     857     * @param bool $do_redirect_guess Whether to attempt to guess a redirect URL
     858     *                                for a 404 request. Default is true.
    859859     */
    860860    if ( false === apply_filters( 'do_redirect_guess_404_permalink', true ) ) {
     
    863863
    864864    /**
    865      * Filters whether to short-circuit redirect guess of 404 requests.
     865     * Filters whether to short-circuit redirect URL guessing for 404 requests.
    866866     *
    867867     * Passing a non-null value to the filter will effectively short-circuit
     
    879879
    880880    if ( get_query_var( 'name' ) ) {
    881 
    882881        /**
    883          * Filters whether to do a strict or loose guess.
     882         * Filters whether to perform a strict or loose guess.
    884883         *
    885884         * Passing a truthy value to the filter will redirect only exact post_name matches.
     
    887886         * @since 5.5.0
    888887         *
    889          * @param bool $strict_guess Whether to do a strict/exact guess. Default false.
     888         * @param bool $strict_guess Whether to perform a strict/exact guess. Default false (loose guess).
    890889         */
    891890        $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false );
Note: See TracChangeset for help on using the changeset viewer.