Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
629 views
in Q2A Core by
reopened by

I  want to make plugin that will trigger some PHP code when someone post new question. This is what I got for now:

https://pastebin.com/ydLCTQ48

So, as you can see I am trying to add code that will clear Facebook share cache immediately after question is published. I found FB share cache clear script on Github and now I want to implement that in Q2A plugin. I am beginner in PHP, so sorry if my code is silly. Or, maybe there is some another way to do that automatically?

Q2A version: 1.8.1

1 Answer

0 votes
by
selected by
 
Best answer

Looks like you’ve made a good start. Where exactly are you stuck?

If you want to trigger the code you have there, you’ll need to add a line to your qa-plugin.php that calls qa_register_plugin_module as described on this page.

Let me know if you have any specific questions.

by
That's it! I registered module as event. Thanks :)
...