rest_allow_anonymous_comments

SummerySummery

Filter whether comments can be created without authentication.

Syntax

apply_filters( 'rest_allow_anonymous_comments', bool $allow_anonymous, WP_REST_Request $request )

DescriptionDescription

Enables creating comments for anonymous users.

ParametersParameters

$allow_anonymous

(bool) Whether to allow anonymous comments to be created. Default false.

$request

(WP_REST_Request) Request used to generate the response.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top