API page: http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...

In the "Related topics" section I propose there should be a link to Using the theme layer (Drupal 7.x) since it provides a lot of context to how the hook should be used.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Issue tags: +Novice

That sounds like a good idea.

Normally I would say we should make this change in Drupal 8.x first and backport to 7, but since the equivalent page does not seem to exist for Drupal 8 yet (and much of what is there will not apply), I think we can just do this in D7.

cck’s picture

Assigned: Unassigned » cck
Status: Active » Needs review
FileSize
478 bytes

D7 patch for #1

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! That is not a viable way to do an @see though. @see can only be followed by a function name or a link, not additional prose. If you think more detail is necessary, make a paragraph or a sentence, and add it somewhere else in the function documentation.

cck’s picture

Hi, I was thinking this link should be placed under the See Also section, which is in the D8 version. I probably cannot use @link inside the @see. Is there an environment I can test this? If not, I guess we can just use @see with the URL.

jhodgdon’s picture

The See Also section doesn't include text -- just plain links. If you think this can use some explanation, put it into the main text of the function with explanatory text. If you think it's just general background information, just put the plain URL in with @see at the end. Generally, since URLs like drupal.org/node/something are not all that illuminating, I think these URLs are better with some explanation...

cck’s picture

Status: Needs work » Needs review
FileSize
1.4 KB

The modified version is attached. I notice 2 extra errors in the page and include them in this version also.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! A few things:
- Please don't remove the data types on param/return. I realize we didn't add the standard for including them until 8.x, but if they are there, it's not an error.
- @link ... @endlink all has to be on one line. This explains what to do:
http://drupal.org/node/1354#links

cck’s picture

Status: Needs work » Needs review
FileSize
709 bytes

Ok. Please see the new version.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! Can you move the @link...@endlink to a new line so that the line it's on doesn't go so far past 80 characters?

cck’s picture

Status: Needs work » Needs review
FileSize
711 bytes

Hi, it is still over 80, so I remove the () to make it 80.

jhodgdon’s picture

Assigned: cck » jhodgdon
Status: Needs review » Reviewed & tested by the community

That's fine, thanks! For future reference, @link...@endlink lines are allowed to go over 80 characters if that is all that is on the line and the full text is really needed. I think in this case removing the parens was a good idea.

I'll get this patch committed soon!

jhodgdon’s picture

Assigned: jhodgdon » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks again -- committed to 7.x.

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