WordPress开发者和主题制作者的搜索引擎



rest_allow_anonymous_comments ›

Since4.7.0
已弃用n/a
apply_filters( 'rest_allow_anonymous_comments', false, $request )
参数: (2)
  • (bool) $allow_anonymous Whether to allow anonymous comments to be created. Default `false`.
    Required: Yes
  • (WP_REST_Request) $request Request used to generate the response.
    Required: Yes
定义在:
文档:

Filter whether comments can be created without authentication.

Enables creating comments for anonymous users.





源码

$allow_anonymous = apply_filters( 'rest_allow_anonymous_comments', false, $request );