Filters whether comments can be created via the REST API without authentication.
Enables creating comments for anonymous users.
$allow_anonymousbool
false.$requestWP_REST_Request
$allow_anonymous = apply_filters( 'rest_allow_anonymous_comments', false, $request );
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_allow_anonymous_comments