In WordPress, we have the option to register a custom hook for our use. For this, we have “do_action();” which register a hook in WordPress.
you have right above code line to register a hook. you can choose you to hook name and parameters which you want to pass in that hook. Hook name should be unique.
How to use this hook ?
For using this hook we have another function is “add_action();” in this function we need to specify the hook name in which you want to perform the action and the function name in which we’ll write our performing code.
10 is the priority of action and 1 is the no of a parameter which you wanna get via this hook.