AnsPress_Hooks::unpublish_comment( object|array $comment )
Description #
Actions to run after unpublishing a comment.
Parameters #
- $commentobject | array (Required) Comment object.
Source #
File: includes/hooks.php
public static function unpublish_comment( $comment ) { $comment = (object) $comment; $count = get_comment_count( $comment->comment_post_ID ); ap_insert_qameta( $comment->comment_post_ID, [ 'fields' => [ 'unapproved_comments' => $count['awaiting_moderation'] ] ] ); }
Expand full source code Collapse full source code View on GitHub: includes/hooks.php:501
Add your comment