I was doing some exploration of the core theme functions and found it odd that the theming example module recommends a template file with underscores in the filename, whereas all of core uses dashes.
Proposed change would be twofold:
1) rename the theming_example_text_form.tpl.php file to theming-example-text-form.tpl.php, changing its reference in the hook_theme() implementation of the module.
2) Add verbiage to the hook_theme "template" variable code comment, to explicitly recommend the best practice of using dashes in template files.
Comments
Comment #1
jwilson3Tagging.
Comment #2
webchickTheme example module? I'm not aware of such a thing in core. I think this is part of Examples module.
Comment #3
jwilson3Wow, cant believe I mistook this for core. Thanks for setting me straight!
Comment #4
rfayAnd hoping to get a patch from you :-)
Comment #5
jwilson3You bet.
Comment #6
rfayThanks for the great work on this. Just a couple of nits.
You don't want this to have underscores here either do you?
Since this is obviously very important, it may be good to explain here why one must never use underscores.
Comment #7
jwilson3Good points. I've generally cleaned up the comments around this specific feature (see the interdiff to see exactly what was added).
Comment #8
Mile23I'm pretty sure this patch didn't automatically test itself because it ends in 6.
Thanks, jwilson3. :-)
Committed: http://drupalcode.org/project/examples.git/commitdiff/b5f2b4db95c90bf25d...
Comment #9.0
(not verified) CreditAttribution: commentedUpdated to reflect reality