W3cubDocs

/WordPress

apply_filters( ‘rest_send_nocache_headers’, bool $rest_send_nocache_headers )

Filters whether to send no-cache headers on a REST API request.

Parameters

$rest_send_nocache_headersbool
Whether to send no-cache headers.

Source

$send_no_cache_headers = apply_filters( 'rest_send_nocache_headers', is_user_logged_in() );

Changelog

Version Description
6.3.2 Moved the block to catch the filter added on rest_cookie_check_errors() from wp-includes/rest-api.php.
4.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_send_nocache_headers