Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (($node->name() == 'li') && ($id = $node->attributes('id'))) {
- if ($node->attributes('class')) {
- $node->addAttribute('class', $node->attributes('class').' item'.$id);
- } else {
- $node->addAttribute('class', 'item'.$id);
- }
- $class_name = '';
- if ($newItem = $menu->getItem($id)) $class_name = $newItem->class_name;
- if ($class_name) $node->addAttribute('class', $node->attributes('class').' '.$class_name);
- }
Add Comment
Please, Sign In to add comment