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

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

Description Description

Enables creating comments for anonymous users.

Top ↑

Parameters Parameters


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


(WP_REST_Request) Request used to generate the response.

Top ↑

Source Source

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

View on Trac

Top ↑

Changelog Changelog

Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.