LLMS_Comments::__construct()
Contents
Description Description
Source Source
File: includes/class.llms.comments.php
public function __construct() { // secure order notes add_filter( 'comments_clauses', array( __CLASS__, 'exclude_order_comments' ), 10, 1 ); add_action( 'comment_feed_join', array( __CLASS__, 'exclude_order_comments_from_feed_join' ) ); add_action( 'comment_feed_where', array( __CLASS__, 'exclude_order_comments_from_feed_where' ) ); // remove order notes when counting comments add_filter( 'wp_count_comments', array( __CLASS__, 'wp_count_comments' ), 777, 2 ); // Delete comments count cache whenever there is a new comment or a comment status changes add_action( 'wp_insert_comment', array( __CLASS__, 'delete_comments_count_cache' ) ); add_action( 'wp_set_comment_status', array( __CLASS__, 'delete_comments_count_cache' ) ); }
Expand full source code Collapse full source code View on GitHub