wpDiscuz 7 API Documentation

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

wpdiscuz_comment_end

This filter can be used for changing the HTML of the displayed comment.

Changelog

Since 7.0.0 version

Parameters

1. $commentOutput (type: string) - the HTML of the displayed comment
2. $comment (type: WP_Comment object) - the object of the current comment
3. $depth (type: int) - the nested lavel of the displayed comment
4. $args (type: array) - the arguments that should be passed to the walker

Usage

add_filter("wpdiscuz_comment_end", function ($commentOutput, $comment, $depth, $args) {
    if ($depth > 2) {
        $commentOutput .= "Custom Message";
    }
    return $commentOutput;
}, 10, 4);