wp_allow_comment


wp_allow_comment ( $commentdata, $avoid_die = false )

Parameters:
  • (array) $commentdata Contains information on the comment.
  • (bool) $avoid_die When true, a disallowed comment will result in the function returning a WP_Error object, rather than executing wp_die(). Default false.
Returns:
  • (int|string|WP_Error) Allowed comments return the approval status (0|1|'spam'). If `$avoid_die` is true, disallowed comments return a WP_Error.
Defined at:
Change Log:
  • 4: .

Description

Validates whether this comment is allowed to be made.

Related Functions

wp_new_comment, wp_spam_comment, wp_list_comments, wp_trash_comment, wp_delete_comment

Top Google Results

User discussions

wpseek mobile