wpDiscuz 7 API Documentation

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

wpdiscuz_submit_button_before

This action can be used to display custom HTML before the “Sticky”, “Closed”, “Notify” buttons. The HTML will be added outside of the buttons wrapper div.

Changelog

since 7.0.0 version

Parameters

1. $currentUser (type: WP_User object) – the user object that is currently logged in
2. $uniqueId (type: string) – the unique ID of the form
3. $isMainForm (type: int/string) – is the loaded comment form main or not

Usage

add_action("wpdiscuz_submit_button_before", function ($currentUser, $uniqueId, $isMainForm) {
    if ($isMainForm) {
        echo "Custom Message";
    }
}, 10, 3);

Was this article helpful to you? Yes No