apply_filters( 'pre_comment_approved', bool|string|WP_Error $approved , array $commentdata )
Filters a comment’s approval status before it is set.
Parameters
Source
File: wp-includes/comment.php
Changelog
Version | Description |
---|---|
WP-4.9.0 | Returning a WP_Error value from the filter will shortcircuit comment insertion and allow skipping further processing. |
WP-2.1.0 | Introduced. |