Come si può aggiungere un pulsante di attivazione/disattivazione al menu dei post e implementare un'azione per quel pulsante di attivazione/disattivazione in un plugin Discourse?

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 Mi Piace