rest_send_nocache_headers WordPress Filter Hook

The rest_send_nocache_headers hook is called when the WordPress REST API is accessed without the ?_cache={value} parameter. This hook is useful for plugins and themes that need to perform actions when the REST API is accessed without cached data.

apply_filters( 'rest_send_nocache_headers', bool $rest_send_nocache_headers ) #

Filters whether to send nocache headers on a REST API request.


Parameters

$rest_send_nocache_headers

(bool)Whether to send no-cache headers.


Top ↑

Source

File: wp-includes/rest-api/class-wp-rest-server.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.