Filters whether an empty comment should be allowed.
$allow_empty_commentbool
$commentdataarray
comment_agent string$comment_author when the comment was submitted. Default empty.comment_approved int|stringcomment_author stringcomment_author_email string$comment_author. Default empty.comment_author_IP string$comment_author. Default empty.comment_author_url string$comment_author. Default empty.comment_content stringcomment_date string$comment_date_gmt must also be specified.comment_date_gmt string$comment_date in the site’s GMT timezone.comment_karma intcomment_parent intcomment_post_ID intcomment_type string'comment'.comment_meta arrayuser_id int$allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata );
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/allow_empty_comment