3.7. Module hooks

3.7.1. bbcode_register

This hook is implemented by the BBcode module in the file mods/bbcode/api.php. It allows modules to provide extra or override existing BBcode tag descriptions.

Warning: do not delete tags from the list, e.g. removing a tag based on the login status for a user. That would throw off and invalidate the caching mechanisms. If you need to have some tag act differently for different users, then override the behavior for the tag using a callback function and implement the logic in the callback function.

Call time:

This hook is called from the function bbcode_api_initparser() in the BBcode module file mods/bbcode/api.php.

Hook input:

An array of tag description arrays. The keys in this array are tag names. The values are arrays describing the tags. For examples of what these tag descriptions look like, please take a look at the file mods/bbcode/builtin_tags.php.

Hook output:

The same array as the one that was used for the hook call arguments, possibly updated with new or updated tags.