API page: http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...

Describe the problem you have found:

> function: If specified, this will be the function name to invoke for this implementation. If neither file nor function is specified, a default function name will be assumed. For example, if a module registers the 'node' theme hook, 'theme_node' will be assigned to its function. If the chameleon theme registers the node hook, it will be assigned 'chameleon_node' as its function.

I *think* that should say 'neither template nor function'.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Issue tags: +Novice, +Needs backport to D7

I agree that you are correct, it should say "If neither template nor function is specified, ...". Good project for a novice doc contributor!

jhodgdon’s picture

Title: Documentation problem with hook_theme » hook_theme has error in the 'function' section of return value

And it's a problem in D6/7/8

oriol_e9g’s picture

Status: Active » Needs review
FileSize
817 bytes

Try with this.

Status: Needs review » Needs work
Issue tags: -Needs backport to D6, -Novice, -Needs backport to D7

The last submitted patch, hook_theme_doc-1190110-4.patch, failed testing.

oriol_e9g’s picture

Status: Needs work » Needs review
Issue tags: +Needs backport to D6, +Novice, +Needs backport to D7

#3: hook_theme_doc-1190110-4.patch queued for re-testing.

joachim’s picture

Looks good to me.

Though I notice that the key names should be in quotes, like 'path' above.
But that could be left to another issue -- maintainer's call :)

jhodgdon’s picture

Status: Needs review » Needs work

I agree with Joachim - it would be nice to put 'template' and 'file' in quotes.

oriol_e9g’s picture

Key names in quotes and comments wrapped to 80 chars

oriol_e9g’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, for 7.x/8.x please. Thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x and 7.x. Thanks!

webchick’s picture

Version: 8.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)
Issue tags: -Needs backport to D7

Oops. I guess this needs backport to D6 too.

jhodgdon’s picture

Project: Drupal core » Documentation
Version: 6.x-dev »
Component: documentation » API documentation files

Oh and for d6 it's in the docs project

sven.lauer’s picture

Status: Patch (to be ported) » Needs review
FileSize
6.77 KB

Re-rolling for D6. There also were a number of wrapping issues in hook_theme's doc, which I took care of with this patch as well (+slight rewording in the intro paragraph: "info"->"information").

jhodgdon’s picture

Status: Needs review » Fixed

committed, thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.