Make WordPress Core


Ignore:
Timestamp:
11/17/2023 01:27:23 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve some DocBlocks and inline comments per the documentation standards.

Follow-up to [56834], [56836], [56837], [56838].

Props kebbet, costdev, mukesh27, SergeyBiryukov.
See #59651.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r57012 r57120  
    468468
    469469                /**
    470                  * Filters whether to send nocache headers on a REST API request.
     470                 * Filters whether to send no-cache headers on a REST API request.
    471471                 *
    472472                 * @since 4.4.0
    473                  * @since 6.3.2 Moved the block to catch the filter added on rest_cookie_check_errors() from rest-api.php
     473                 * @since 6.3.2 Moved the block to catch the filter added on rest_cookie_check_errors() from wp-includes/rest-api.php.
    474474                 *
    475475                 * @param bool $rest_send_nocache_headers Whether to send no-cache headers.
     
    477477                $send_no_cache_headers = apply_filters( 'rest_send_nocache_headers', is_user_logged_in() );
    478478
    479                 // send no cache headers if the $send_no_cache_headers is true
    480                 // OR if the HTTP_X_HTTP_METHOD_OVERRIDE is used but resulted a 4x response code.
     479                /*
     480                 * Send no-cache headers if $send_no_cache_headers is true,
     481                 * OR if the HTTP_X_HTTP_METHOD_OVERRIDE is used but resulted a 4xx response code.
     482                 */
    481483                if ( $send_no_cache_headers || ( true === $method_overridden && strpos( $code, '4' ) === 0 ) ) {
    482484                        foreach ( wp_get_nocache_headers() as $header => $header_value ) {
Note: See TracChangeset for help on using the changeset viewer.