Changeset 57120 for trunk/src/wp-includes/rest-api/class-wp-rest-server.php
- Timestamp:
- 11/17/2023 01:27:23 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r57012 r57120 468 468 469 469 /** 470 * Filters whether to send no cache headers on a REST API request.470 * Filters whether to send no-cache headers on a REST API request. 471 471 * 472 472 * @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.php473 * @since 6.3.2 Moved the block to catch the filter added on rest_cookie_check_errors() from wp-includes/rest-api.php. 474 474 * 475 475 * @param bool $rest_send_nocache_headers Whether to send no-cache headers. … … 477 477 $send_no_cache_headers = apply_filters( 'rest_send_nocache_headers', is_user_logged_in() ); 478 478 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 */ 481 483 if ( $send_no_cache_headers || ( true === $method_overridden && strpos( $code, '4' ) === 0 ) ) { 482 484 foreach ( wp_get_nocache_headers() as $header => $header_value ) {
Note: See TracChangeset
for help on using the changeset viewer.