wpDiscuz 7 API Documentation

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


This filter can be used for adding some HTML after the user role div (after the div with the wpd-comment-label class).


Since 7.0.0 version


1. $html (type: string) – the HTML that should be added after the user role
2. $comment (type: WP_Comment object) – the object of the current comment


add_filter("wpdiscuz_after_label", function ($afterLabelHtml, $comment) {
    if ($comment->user_id && class_exists('userpro_api')) {
        $afterLabelHtml .= userpro_show_badges($comment->user_id, $inline = true);
    return $afterLabelHtml;
}, 110, 2);

Was this article helpful to you? Yes No