wpDiscuz 7 API Documentation

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


This filter can be used for changing the classes applied to the comment wrapper div.


Since 7.0.0 version


1. $commentWrapperClasses (type: array) – the array of the classes applied to comment wrapper div
2. $comment (type: WP_Comment object) – the object of the current comment


add_filter("wpdiscuz_comment_wrap_classes", function ($commentWrapperClass, $comment) {
    if ($comment->comment_ID == 1) {
        $commentWrapperClass[] = "my-cutom-wrapper-class";
    return $commentWrapperClass;
}, 10, 2);

Was this article helpful to you? Yes No