Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Comments::should_modify_comment_counts()

Determines whether or not comment count modification is necessary.


Description Description

Since WordPress 6.0 the get_comment_count() function utilizes get_comments() whereas in earlier versions the counts are retrieved by a direct SQL query. This change means that the filter in this class on comments_clauses ensures that our comments we hide & don’t count in the comments management UI are already excluded and we do not need to filter wp_count_comments to subtract our comments.


Top ↑

Return Return

(boolean) Returns true on WP earlier than 6.0 and false on 6.0 and later.


Top ↑

Source Source

File: includes/class.llms.comments.php

	private static function should_modify_comment_counts() {
		global $wp_version;
		return version_compare( $wp_version, '6.0-src', '<' );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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