wpDiscuz 7 API Documentation

⌘K
  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentat...
  4. Filters
  5. wpdiscuz_comment_wrap_classes

wpdiscuz_comment_wrap_classes

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

Changelog

Since 7.0.0 version

Parameters

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

Usage

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