hooks functions added and an example hook.php added to show how it can be used