Class connector for adding button to post

I am trying to make colne of this plugin: Add a button at the bottom of a topic, visible to a specific group: discourse-topic-group-button
I am trying to add button at every single post , not topics.
But I do not know how to set my class connectors for injecting buttons or icons into post.
If I understand well plugin I noticed using this connector over this
If I want to add button in post menu how my connector should looks like?

1 Like

If you want to add a button to the post menu then you’ll need something a little bit different since posts are widgets.

You would need to add something like this to your theme / plugin.

api.addPostMenuButton("my-button", () => {
  return {
    action: "someAction",
    icon: "someIcon",
    className: "someClass",
    title: "some title",

The plugin API has a method for adding new buttons that makes this relatively easy.

This theme component uses that method to add a new button to that menu based on some conditions and defines a new action, so have a look here