I am brand new to WordPress plugin development and have a few questions, mostly about best practices but also some specifics.
Essentially I just want to trigger an action (invoking a PHP class and calling a method) whenever the following happens:
- A post is published
- A page is published
- A comment is added
This will be site-wide, so no need to key in anything specific just yet. I know in the past people had used the add_action() function but that is now deprecated so any insight on best practices and how to accomplish the above would be much appreciated. To get started I am using: https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate just to ensure I have proper structure, etc.