it looks good to have parameters description on the function page

CommentFileSizeAuthor
#9 664806-8.patch1.15 KBsender
#7 664806-5.patch1.14 KBsender
#2 664806.patch1.17 KBjhodgdon

Comments

jhodgdon’s picture

Title: Documentation problem with phptemplate_theme » phptemplate_theme doc headers need standardization
Version: 6.x-dev » 7.x-dev
Issue tags: +Novice

Agreed. The doc headers for http://api.drupal.org/api/function/phptemplate_theme in both Drupal 6 and Drupal 7 need a clean up.

Since they are actually hook_theme() implementations, they should just say:

Implements hook_theme().

as the first line, then maybe have a blank line and some more information there. The current doc is lacking () after hook_theme(), so there is no link to hook_theme(), which would have said what the args were.

See http://drupal.org/node/1354 for standards. And please patch in 7.x first, then backport to 6.x.

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new1.17 KB

Looking at this function, I don't think it needs doc beyond what is in hook_theme(). Our standard is only to document hook implementations extensively if they are doing something really noteworthy. So, here's a patch that standardizes the doc header for this function, and the other one in the same file (which completely lacked doc before).

Should be ported to D6 if accepted.

sobi3ch’s picture

Status: Needs review » Reviewed & tested by the community

I agree, the doc for hook_theme() is enought for it..

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD, thanks!

jhodgdon’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)

Needs port to Drupal 6 as well.

sender’s picture

Assigned: Unassigned » sender
sender’s picture

Assigned: sender » Unassigned
Status: Patch (to be ported) » Needs review
StatusFileSize
new1.14 KB

Version for D6.

jhodgdon’s picture

Status: Needs review » Needs work

Sigh. sender - I forgot to mention that in D6, all the other hook implementations are still following the old standard, so they say
Implementation of hook_foo().
rather than
Implements hook_foo().

So we should probably also do the same here.

sender’s picture

Status: Needs work » Needs review
StatusFileSize
new1.15 KB

No biggie. Here's a new version with the change you mentioned.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Thanks!

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)
Issue tags: -Novice

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