WordPress at a glance
filter is not described

rest_enabled filter-hook . WP 4.4.0

Deprecated in 4.7.0. It is no longer supported and can be removed in future releases. Use the rest_authentication_errors filter to restrict access to the API instead.

Deprecated: 4.7.0 Use the rest_authentication_errors filter to restrict access to the API

Filters whether the REST API is enabled.

Usage

add_filter( 'rest_enabled', 'filter_function_name_8180', 10, 4 );
function filter_function_name_8180( $rest_enabled, $string, $string, $__ ){
	// filter...

	return $rest_enabled;
}
$rest_enabled(true/false)
Whether the REST API is enabled.
Default: true
$string
-
$string
-
$__
-

Changelog

Since DEL 4.7.0 Introduced.

Where the hook is called

WP_REST_Server::serve_request()
rest_enabled
wp-includes/rest-api/class-wp-rest-server.php 267-273
apply_filters_deprecated(
	'rest_enabled',
	array( true ),
	'4.7.0',
	'rest_authentication_errors',
	__( 'The REST API can no longer be completely disabled, the rest_authentication_errors filter can be used to restrict access to the API, instead.' )
);

Where the hook is used (in WP core)

Usage not found!