LLMS_Comments::__construct()


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' ) );

	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.