Closed (won't fix)
Project:
Drupal core
Version:
5.2
Component:
theme system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Aug 2007 at 05:36 UTC
Updated:
4 Oct 2007 at 12:26 UTC
Code in theme.inc appears to want to set any custom class attributes to both the link and the LI. However, the custom attributes are not added to the LI. If this is expected behaviour, the $class variable can be removed. Sorry I don't have a proper patch file, but I'm not set up on my current box. . .
function theme_links (theme.inc:537)
// Automatically add a class to each link and also to each LI
if (isset($link['attributes']) && isset($link['attributes']['class'])) {
$link['attributes']['class'] .= ' ' . $key;
$class = $key;
}
else {
$link['attributes']['class'] = $key;
$class = $key;
}
should read:
// Automatically add a class to each link and also to each LI
if (isset($link['attributes']) && isset($link['attributes']['class'])) {
$link['attributes']['class'] .= ' ' . $key;
$class = $link['attributes']['class'];
}
else {
$link['attributes']['class'] = $key;
$class = $key;
}
Comments
Comment #1
dvessel commentedThe keys inside $links are the only thing used to add classes to list items. The attributes set are meant for anchors.