XenForo hooks are code snippets inside XenForo templates to execute any code in PHP via a plugin or template_hook event listener.
The syntax for such code snippet is
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
<xen:hook name="HOOK_NAME"> | |
ANY HTML CODE | |
</xen:hook> | |
<xen:hook name="HOOK_NAME" /> |
Hooks can be recursive in nature and can contain hooks inside a hook. The hook listener is executed at the start of the hook and not at the end. Any plugin, want to execute a code for the hook, will create a listener to either all the hooks and check the conditional or can listen to a particular hook.
Here is the Complete Visual Guides to XenForo Hooks.