-
Notifications
You must be signed in to change notification settings - Fork 83
4. Actions
Héctor Cabrera edited this page May 25, 2022
·
6 revisions
Actions are hooks that are fired after specific events take place in WordPress, such as publishing a new post, registering a new user, etc. Basically, actions let you do stuff when something has happened.
You can take advantage of this to do stuff when certain actions happens within WordPress Popular Posts. To hook into these actions, put your custom functions in your theme's functions.php file (or you can also create a plugin for this purpose, if you know how to).
Available action hooks:
Since: 3.2.2.
This hook runs before updating the views count of a post / page.
Arguments: INT post ID, INT views count.
Since: 3.0.0.
This hook runs after updating the views count of a post / page.
Arguments: INT post ID.