wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_allow_anonymous_comments › WordPress Filter Hooks

Since4.7.0
Deprecatedn/a
apply_filters( 'rest_allow_anonymous_comments', false, $request )
Parameters: (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
Defined at:
Codex:

Filters whether comments can be created via the REST API without authentication.

Enables creating comments for anonymous users.





Source

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