Torquemag.io
/** The structure of the hook
add_action ( 'hook_name', 'your_function_name', [priority], [accepted_parameters] );
function your_function_name() {
// code goes here
}
/** Example
add_action('twentyfifteen_credits', 'nick_footer_greeting');
function nick_footer_greeting() {
echo 'Hi, thanks for coming to my site!';
}
http://torquemag.io/complete-newbie-guide-wordpress-hooks/