ActionScheduler_wpCommentLogger::filter_comment_count
Remove action log entries from wp_count_comments()
Метод класса: ActionScheduler_wpCommentLogger{}
Хуков нет.
Возвращает
object.
Использование
$ActionScheduler_wpCommentLogger = new ActionScheduler_wpCommentLogger(); $ActionScheduler_wpCommentLogger->filter_comment_count( $stats, $post_id );
- $stats(массив) (обязательный)
- Comment count.
- $post_id(int) (обязательный)
- Post ID.
Код ActionScheduler_wpCommentLogger::filter_comment_count() ActionScheduler wpCommentLogger::filter comment count WC 11.2.2
public function filter_comment_count( $stats, $post_id ) {
global $wpdb;
if ( 0 === $post_id ) {
$stats = $this->get_comment_count();
}
return $stats;
}