警告:此钩子已被弃用。使用rest_authentication_errors过滤器来限制对API的访问。
过滤是否启用REST API。
原型
apply_filters_deprecated( 'rest_enabled', bool $rest_enabled )
参数
$rest_enabled
(bool)
是否启用了REST API。默认为true。
源文件
路径:wp-includes/rest-api/class-wp-rest-server.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/rest_enabled/