Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function phptemplate_menu_item_link($link) {
- if (empty($link['options'])) {
- $link['options'] = array();
- }
- // If an item is a LOCAL TASK, render it as a tab
- if ($link['type'] & MENU_IS_LOCAL_TASK) {
- $link['title'] = '<span class="tab">'. check_plain($link['title']) .'</span>';
- $link['options']['html'] = TRUE;
- }
- if (empty($link['type'])) {
- $true = TRUE;
- }
- //get unique id from menu item title
- $css_id = phptemplate_id_safe(str_replace(' ', '_', strip_tags($link['title'])));
- //set unique id for link
- if ($link['menu_name'] == 'primary-links') {
- $link['options']['attributes']['id'] = 'id-' . $css_id;
- }
- return l($link['title'], $link['href'], $link['options']);
- }
Add Comment
Please, Sign In to add comment