Warning: This hook has been deprecated. Use the ‘rest_authentication_errors’ filter to restrict access to the API instead.

apply_filters_deprecated( 'rest_enabled', bool $rest_enabled )

Filters whether the REST API is enabled.


Parameters Parameters

$rest_enabled

(bool) Whether the REST API is enabled. Default true.


Top ↑

Source Source

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

View on Trac



Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Use the 'rest_authentication_errors' filter to restrict access to the API.
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.