The feature of disabling DHTML for specific menus, along with the possibility of menu blocks just not appearing on certain pages, means that the theme functions stand a good chance of not being called at all. Code registry to the rescue! dhtml_menu_theme* and their private helpers are used either all at once or not at all, so they had best be in a separate file.
dhtml_menu.theme.inc sounds like a winner.
That leaves dhtml_menu.module with only hook_init, hook_help and the serialized defaults constant.
Comments
Comment #1
cburschkaAddendum: On second thought, of course the theme functions will still be called for DHTML-disabled menus. But still, these menus don't necessarily appear at all, so the refactoring still makes sense.
Comment #2
cburschkaHere it comes.
Comment #3
cburschkaUm, whoops. Adding a file requires a change to dhtml_menu.info too, or the code registry is unhappy.
Comment #4
cburschkaRemoved some superfluous comments from dhtml_menu.info too.
Comment #5
cburschkaWhoops again. I accidentally removed the .install file.
Comment #6
cburschkaCommitted to HEAD.