AnsPress_Comment_Hooks::the_comments( array $comments )
Description #
Filter comments array to include only comments which user can read.
Parameters #
- $commentsarray (Required) Comments.
Source #
File: includes/comments.php
public static function the_comments( $comments ) {
foreach ( $comments as $k => $c ) {
if ( 'anspress' === $c->comment_type && ! ap_user_can_read_comment( $c ) ) {
unset( $comments[ $k ] );
}
}
return $comments;
}
Expand full source code Collapse full source code View on GitHub: includes/comments.php:31
Add your comment