Is using register_activation_hook required?

Question

I’m building my first plugin and it’s very basic. I created my init class that is used for enqueue styles.. etc. It also has the register_activation_hook and register_deactivation_hook hooks but I don’t know what to do with those!

My question is this.. Put yourself in my position, that you want to create a basic plugin that adds small features like related posts, maybe some small widgets… etc, and you don’t want to do anything on activation/deactivation or uninstall.. Would you..

  • Remove those hooks?
  • Keep the hooks and leave the callback functions empty or return null…?
  • Do something else that any plugin should do when activate or deactivate or uninstall?

Thank you!

0
mrKC.988 4 months 2020-12-19T13:10:26-05:00 0 Answers 8 views 0

Leave an answer

Browse
Browse