How can one add a toggle button to the post menu and implement an action for that toggle button in a Discourse plugin?

Reading the above linked topics should answer your related dev questions. It’s possible you could achieve what you want with a theme component instead of plugin. Thus, I would also add these to your reading list:

also, from the first link I posted:

3 Likes