WordPress at a glance
filter is not described

rest_allow_anonymous_comments filter-hook . WP 4.7.0

Filter whether comments can be created without authentication.

Enables creating comments for anonymous users.

Usage

add_filter( 'rest_allow_anonymous_comments', 'filter_function_name_4692', 10, 2 );
function filter_function_name_4692( $allow_anonymous, $request ){
	// filter...

	return $allow_anonymous;
}
$allow_anonymous(true/false)
Whether to allow anonymous comments to be created.
Default: false
$request(WP_REST_Request)
Request used to generate the response.

Where the hook is called

WP_REST_Comments_Controller::create_item_permissions_check()
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 410
$allow_anonymous = apply_filters( 'rest_allow_anonymous_comments', false, $request );

Where the hook is used (in WP core)

Does not used.