allow_empty_comment WordPress Filter Hook

The allow_empty_comment Wordpress hook allows comments to be posted without any content. This can be useful for allowing people to post a reaction or simply express their opinion without having to write a full comment.

apply_filters( 'allow_empty_comment', bool $allow_empty_comment, array $commentdata ) #

Filters whether an empty comment should be allowed.


Parameters

$allow_empty_comment

(bool)Whether to allow empty comments. Default false.

$commentdata

(array)Array of comment data to be sent to wp_insert_comment().


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More