WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about allow_empty_comment

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/class-wp-xmlrpc-server.php apply_filters 3993 /**
* Filters whether to allow anonymous comments over XML-RPC.
*
* @since 2.7.0
*
* @param bool $allow Whether to allow anonymous commenting via XML-RPC.
* Default false.
*/
wp-includes/comment.php apply_filters 3632 /**
* Filters whether an empty comment should be allowed.
*
* @since 5.1.0
*
* @param bool $allow_empty_comment Whether to allow empty comments. Default false.
* @param array $commentdata Array of comment data to be sent to wp_insert_comment().
*/
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php apply_filters 1899 /**
* If empty comments are not allowed, checks if the provided comment content is not empty.
*
* @since 5.6.0
*
* @param array $prepared_comment The prepared comment data.
* @return bool True if the content is allowed, false otherwise.
*/

Hook Parameters

Parameter Type Name Description
bool $allow_empty_comment Whether to allow empty comments. Default false.
array $commentdata Array of comment data to be sent to wp_insert_comment().