wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_comment_count_phrase
Generic selectors
Exact matches only
Search in title
Search in content

wpdiscuz_comment_count_phrase

This filter can be used for changing the comment/comments phrase under the comment form.

Changelog

since 7.3.0 version

Parameters

1. $phrase – the comment/comments phrase. This depends on the comment count
2. $commentsCount – the count of the comments. For this count, the phrase should be passed.

Usage

add_filter("wpdiscuz_comment_count_phrase", function ($phrase, $count) {
    return $count == 1 ? "comment" : "comments";
}, 10, 2);

Was this article helpful to you? Yes No