Is it possible to automatically turn core function names into links to api.drupal.org? For instance: 'hook_node_load' would become 'hook_node_load'.

If it's possible at all, would you consider it helpful?

We would at least need figure out how to handle common words that match function names by coincidence. For instance, we don't need to link 'theme' to http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/7 everywhere.


This is a good idea, although I think we have a stronger selling point to Stack Exchange if there was an existing JavaScript library to parse function names à la MathJax on other sites in the network.

I think the generic name for Drupal function use case can be solved by always referring to functions as such: theme(), hook_node_load(), and so forth. Referring to functions rather than—to an outsider—seemingly arbitrary strings helps reinforce generic programming concepts over a collection of Drupalisms.

  • You're right, the brackets should be enough to differentiate between a word and a function name. Using an existing library is always a good idea, but I wouldn't know which library. – marcvangend Jun 28 '11 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .