Created
July 10, 2022 19:11
-
-
Save dgaitan/6fb9d11719c0f199c298504be0eac96c to your computer and use it in GitHub Desktop.
WordPress Hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* An action hook recives four params. | |
* | |
* @param string $hook_name - The name of the hook | |
* @param callable $callback - The callback where we are going to add our logic. | |
* @param int $priority - The priority of the hook. Used to specify the order in which the functions associated with a particular action are executed. | |
* @param int $params - The number of arguments the function accepts | |
*/ | |
add_action( 'action_hook_name', 'callback_name', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment