rest_send_nocache_headers filter-hook . WP 4.4.0
Send nocache headers on authenticated requests.
Usage
add_filter( 'rest_send_nocache_headers', 'filter_function_name_998' ); function filter_function_name_998( $rest_send_nocache_headers ){ // filter... return $rest_send_nocache_headers; }
- $rest_send_nocache_headers(true/false)
- Whether to send no-cache headers.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
rest_send_nocache_headers
wp-includes/rest-api/class-wp-rest-server.php 354
$send_no_cache_headers = apply_filters( 'rest_send_nocache_headers', is_user_logged_in() );