wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_form_render
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

wpdiscuz_form_render

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

Changelog

since 7.0.0 version

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);

Was this article helpful to you? Yes No