| 1 |
<?php
|
| 2 |
function ad_redoable_menu_item_link($link) {
|
| 3 |
if (empty($link['options'])) {
|
| 4 |
$link['options'] = array();
|
| 5 |
}
|
| 6 |
|
| 7 |
// If an item is a LOCAL TASK, render it as a tab
|
| 8 |
if ($link['type'] & MENU_IS_LOCAL_TASK) {
|
| 9 |
$link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
|
| 10 |
$link['options']['html'] = TRUE;
|
| 11 |
}
|
| 12 |
|
| 13 |
if (empty($link['type'])) {
|
| 14 |
$true = TRUE;
|
| 15 |
}
|
| 16 |
|
| 17 |
return l($link['title'], $link['href'], $link['options']);
|
| 18 |
}
|
| 19 |
|
| 20 |
/**
|
| 21 |
* Duplicate of theme_menu_local_tasks() but adds clear-block to tabs.
|
| 22 |
*/
|
| 23 |
function ad_redoable_menu_local_tasks() {
|
| 24 |
$output = '';
|
| 25 |
|
| 26 |
if ($primary = menu_primary_local_tasks()) {
|
| 27 |
$output .= '<ul class="tabs primary clear-block">' . $primary . '</ul>';
|
| 28 |
}
|
| 29 |
if ($secondary = menu_secondary_local_tasks()) {
|
| 30 |
$output .= '<ul class="tabs secondary clear-block">' . $secondary . '</ul>';
|
| 31 |
}
|
| 32 |
|
| 33 |
return $output;
|
| 34 |
}
|