Yes, it should work as well. But I'd always prefer the secure post hook instead of overwriting the code in total.
It should do the trick to change the contents of the name label without breaking other code that prehooks the same variable e.g.
Depending on the load order of the addons you use this is more stable, or at least does not break other addons.
But depending on the use case andy.s is correct. You often cannot achieve the stuff you want with a hook and need to overwrite the functions too.
|