i have seen some discussion on overriding or customizing the template functions in the past but couldn't tell where if anywhere it left off.
i would like the ability to customize any of the template functions that emit html especially printPasswordForm. i don't want to call my own custom function because that would mean replacing all the calls to printPasswordForm and i would like something unobtrusive.
the discussion about overriding the template functions from the admin console was interesting but that post appears to be old and i don't know if it ever got anywhere.
what i have done and am curious to get feedback on is the following:
i have added the following to the top of the printPasswordForm in template-funcions.php
`
if (function_exists('customPrintPasswordForm')) {
customPrintPasswordForm($hint, $showProtected, $showuser);
return;
}
`
i have then copied the printPasswordForm function to my template's customfunctions.php file where i have made the updates in the html formatting i desired. in the future i can easily diff my customPrintPasswordForm with the latest Zenphoto printPasswordForm to see if i have introduced any undesirable behaviors. i can also easily disable the customPrintPasswordForm override/custom function by changing its name to something else or deleting it.
if all the print... functions had hooks in them like this i could customize them easily at my own discretion.
thoughts, suggestions?
Comments
Have you tried just changing the CSS?