Download & Extend

Documentation for theme_links should say that Attributes class must be an array

Project:Drupal core
Version:7.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:rocket_nova
Status:closed (fixed)
Issue tags:needs backport to D7, Novice

Issue Summary

API page: http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_links/7

Describe the problem you have found:

attributes: (optional) Attributes for the anchor, or for the tag used in its place if no 'href' is supplied.

This needs to say that if class is supplied, it must be an array:

'attributes' => array(
'class' => array('colorbox-load'),
),

this will crash:

'attributes' => array(
'class' => 'colorbox-load',
),

Comments

#1

Issue tags:+Novice

Good idea, and probably a good project for a novice contributor.

#2

Indeed, and could be copied from the docs for http://api.drupal.org/api/drupal/includes--common.inc/function/l/7.

#3

Assigned to:Anonymous» rocket_nova

Working on this at BADCamp.

#4

Status:active» needs review

Patch attached.

AttachmentSizeStatusTest resultOperations
theme_inc-1314396-4.patch789 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 33,616 pass(es).View details

#5

Status:needs review» reviewed & tested by the community

Looks good! :)

#6

Indeed, thanks!

#7

Version:8.x-dev» 7.x-dev

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

#8

Status:reviewed & tested by the community» fixed

Committed and pushed to 7.x. Thanks!

#9

Status:fixed» closed (fixed)

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

nobody click here