wpDiscuz 7 API Documentation

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

wpdiscuz_comment_type_icon

This filter can be used for adding new icons at the bottom of the comment section next to the existing one (sticky, closed, etc).

Changelog

Since 7.0.0

Parameters

1. $html (type: string) – the HTML adding to the comment displaying icons
2. $comment (type: WP_Comment object) – the object of the current comment
3. $user (type: WP_User object) – the user object of the current comment author
4. $currentUser (type: WP_User object) – the user object that is logged in at the current time

Usage

add_filter("wpdiscuz_comment_type_icon", function ($html, $comment, $user, $currentUser) {
    $html .= "Custom Icon";
    return $html;
}, 10, 4);

Was this article helpful to you? Yes No 1