Closed mdoggydog closed 1 year ago
(We're using this hook to inject an avatar into the PersonalTools toggle if a logged-in user has one.
In retrospect, #347 is not strictly necessary if this hook is available, but I suppose it is better to do as little code/style replication in the hook function as possible.
Anyhow, none of the hooks are documented anywhere... so no one is going to know that this is even available anyway. ;^) )
This commit adds a
ChameleonNavbarHorizontalPersonalToolsLinkInnerHtml
hook which can be used to completely customize the inner html of the dropdown toggle link ofPersonalTools
.This hook will be passed three parameters:
$newtalkNotifierHtml
(by reference)$userNameHtml
(by reference)PersonalTools
objectThe first two parameters are strings bearing the values computed by the PersonalTools component (according to its configuration, etc), which the hook function may modify (or leave alone).
After the hook function is complete, the values of
$newtalkNotifierHtml
and$userNameHtml
will be concatenated (in that order) to yield the raw html content of the dropdown toggle's<a>
element.