WordPress at Your Fingertips
filter is not described

rest_allow_anonymous_comments filter-hook . WP 4.7.0

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

Enables creating comments for anonymous users.


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

	return $allow_anonymous;
Whether to allow anonymous comments to be created.
Default: false
Request used to generate the response.

Where the hook is called

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

Where in WP core the hook is used WordPress

Usage not found.