wpDiscuz 7 API Documentation

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

wpdiscuz_form_render

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

Parameters

1. $output (type: string) – the HTML of the displayed form
2. $commentsCount (type: int) – the number of comments at the current time
3. $currentUser (type: WP_User object) – the user object that is logged in at the current time

Usage

add_filter("wpdiscuz_form_render", function ($output, $commentsCount, $currentUser) {
    if (!empty($currentUser->ID)) {
        $output .= "Custom Text After Form";
    }
    return $output;
}, 10, 3);

Changelog

since 7.0.0 version