pre_comment_approved – filter
Filters a comment’s approval status before it is set.
Parameters
- .
- ( 2.1.0 ) . .
- Returning
- ( 4.9.0 ) a WP_Error value from the filter will short-circuit comment insertion and allow skipping further processing. . . .
- $approved
- ( int|string|WP_Error ) The approval status. Accepts 1, 0, ‘spam’, ‘trash’, or WP_Error. . . .
- ( array ) $commentdata Comment data. . . .