UPDATE: The comment by jtsnow resolves the general problem of overriding theme functions in a module using
hook_theme_registry_alter(). Woohoo! But the specific problem described below to override the rendering of menu items remains.
I am trying to instruct the menu system to display each item's description underneath the item text, in a smaller font. I located the theme_menu_item() function in menu.inc that currently performs this task.
"Install profile" is a really awful name, don'tcha think? I prefer "Drupal distro".
Here are some distros that I would love to work on:
Originally published at OpenCraft.
What happens if you need to open a file with
fopen, but find that your function can exit at multiple points? It is tedious and error-prone to call
fclose at each exit point. Alternatively, you could re-structure your code to only exit at the bottom, thereby calling
fclose only once, but you would end up with many nested blocks that hamper readibility and are generally considered bad programming style.
A technique I like to use in those cases is the Automatic Resource Destructor.
The taxonomy system is one of the great contributions of Drupal to the technology of CMS: the ability to classify content with multiple vocabularies. Each vocabulary represents a dimension of concern in the content being managed. Further, a single taxonomy has a flexible structure: it can be linear, tree-like, even graph-like when multiple parents are chosen. Content can be restricted to be tagged with a single term, or multiple terms can be allowed. Finally, freetagging is supported.