I'm writing a fairly simple module which allows the removal of colons from field output on a per field basis and I need to override the core field module's theme_field function in my module.
I can modify the theme registry with hook_theme_registry_alter() and change the field function to point to my custom function. Unfortunately once I do that I'm no longer able to override field.tpl.php in a theme.
The cascade I'd like to achieve is in order of template preference (most important first):
- Active theme's field.tpl.php
- My custom module's field.tpl.php (or custom_field theme function)
- Field module's theme_field function
Is this possible?
This answer comes close but requires a differently named template which I don't want. I'd like to keep things clean for the themer so if they override field.tpl.php in their theme the output is as expected, rather than having to copy a different tpl file from my custom module.