Filters whether the REST API is enabled.
Parameters
$rest_enabled
bool- Whether the REST API is enabled. Default true.
Source
apply_filters_deprecated(
'rest_enabled',
array( true ),
'4.7.0',
'rest_authentication_errors',
sprintf(
/* translators: %s: rest_authentication_errors */
__( 'The REST API can no longer be completely disabled, the %s filter can be used to restrict access to the API, instead.' ),
'rest_authentication_errors'
)
);
Changelog
Version | Description |
---|---|
4.7.0 | Use the 'rest_authentication_errors' filter to restrict access to the REST API. |
4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.