If you want to get more granular with what you can do, you could extend the XF\Template\Compiler\Tag\Username
class.
I could be wrong but I remember
@Mike saying not to touch template tag classes as it will cause during upgrades?
Also, most if not all tags will always call a template function which is always located in the
\XF\Template\Templater
, eg:
<xf:username />
will always call
username_link
and similarly
<xf:date />
will call
date_dynamic
.
Now if you're wondering how to figure which method is being called for the tag then it is quite simple, you just need to open the tag class and see which function it is calling.
So if you were to be interested in figuring out what template function will
<xf:captcha />
be calling, you would open the
\XF\Template\Compiler\Tag\Captcha
and there you will search
{$compiler->templaterVariable}->func(
(you can find multiple results depending on the tag) and then you find something like this:
PHP:
return "{$compiler->templaterVariable}->func('captcha', array({$force}, {$forceVisible}))";
The first parameter that is being passed to the
func()
method is the template function which
<xf:captcha />
or the tag you are messing around with will be calling so this case it will be
captcha
.