7

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.

3
  • Possible duplicate: meta.drupal.stackexchange.com/questions/319/…
    – Laxman13
    Commented Jun 28, 2011 at 18:52
  • Sorry I didn't find that one before I posted this. It's not an exact duplicate, but definitely related. Commented Jun 28, 2011 at 19:41
  • Yea, just thought would be worth showing both for the sake of discussion
    – Laxman13
    Commented Jun 28, 2011 at 19:54

1 Answer 1

3

This is a good idea, although an existing JavaScript library that parses function names would be a stronger selling point to Stack Exchange. Other Stack Exchange sites already use the MathJax library.

I think the generic name for Drupal function use case can be solved by always referring to functions as (for example) theme() or hook_node_load().

1
  • 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. Commented Jun 28, 2011 at 20:56

You must log in to answer this question.

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