A WordPress-centric search engine for devs and theme authors



rest_allow_anonymous_comments ›

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:

Filter whether comments can be created without authentication.

Enables creating comments for anonymous users.





Source

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