Since all of the IDs/Classes in Drupal and Zen use dashes ( - ) rather than underscores ( _ ), I believe that the zen_id_safe function should replace underscores with dashes to be consistent.
This change also requires zen_id_safe to be wrapped around the line in which the node-type-* class is defined.
Thoughts?
Patch Summary (all edits are made in zen/template.php):
1) changed line 183 from
$classes[] = 'node-type-' . $vars['type'];
to
$classes[] = zen_id_safe('node-type-' . $vars['type']);
2) Updated the preg_replace to replace underscores.
3) Fixed a line in the comments on line 249. It should read "// If the first character is not a-z, add 'id' in front.
", not "// If the first character is not a-z, add 'n' in front."
Comment | File | Size | Author |
---|---|---|---|
id_safe_update.patch | 1.08 KB | kmonty |
Comments
Comment #1
kmontyComment #2
JohnAlbinSounds good to me. Also, Drupal core's body class "node-TYPE" already uses dashes instead of underscores.
Fixed. Thanks!