I want to manipulate the return value of XenForo_Template_Public::getRequiredCssUrl , how could I do that? The load_class listener does not work. And I am not sure which template I should manipulate to manipulate the return value of that function. Thanks!!
The templating system doesn't really appear to be written with much interaction with the load_class listener framework, and makes heavy use of static methods & variables.
Excluding code edits;
The closest way, to achieve rewriting the Css Urls, is to use a post render template hook to zero out/replace the magic marker "<!--XenForo_Require:CSS-->". And then use tricks such as defining your own classes providing getters & setters for the protected static class members hidden deep in the templating system.
Actually there's an 'ugly' way by porting into Autoloader to extend the class XenForo_Template_Public which I use to extend the exact same method. I created that autoloader myself, you can use https://github.com/Yoskaldyr/cmf_core/ to do that
I learnt how to use sed and now I have a simple bash script that I execute after each upgrade. If if would also upgrade the file hashes, too so xenforo doesn't remind me of the changed files. It is really very easy to work with and I have all my file edits within that single bash script so it works as a simple file-change-documentation, too.