wpDiscuz 7 API Documentation

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

wpdiscuz_editor_buttons

This filter can be used for adding new buttons or deleting the existing buttons on the comment form. You can also use it for changing the ordering of buttons.

Changelog

Since 7.0.0 version

Parameters

1. $editorButtons (type: array) - the array of the buttons displaying on the comment form
2. $uniqueId (type: string) - the unique ID of the form

Usage

add_filter("wpdiscuz_editor_buttons", function ($editorButtons, $uniqueId) {
    $editorButtons[] = ["class" => "ql-custom-button", "value" => "", "name" => "custom", "svg" => "[-]"];
    return $editorButtons;
}, 10, 2);