root / drupal7 / sites / all / themes / bootstrap / templates / menu / menu-local-tasks.func.php @ 1f623f01
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* @file
|
4 |
* Stub file for bootstrap_menu_local_tasks().
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
* Returns HTML for primary and secondary local tasks.
|
9 |
*
|
10 |
* @param array $variables
|
11 |
* An associative array containing:
|
12 |
* - primary: (optional) An array of local tasks (tabs).
|
13 |
* - secondary: (optional) An array of local tasks (tabs).
|
14 |
*
|
15 |
* @return string
|
16 |
* The constructed HTML.
|
17 |
*
|
18 |
* @see theme_menu_local_tasks()
|
19 |
* @see menu_local_tasks()
|
20 |
*
|
21 |
* @ingroup theme_functions
|
22 |
*/
|
23 |
function bootstrap_menu_local_tasks(&$variables) { |
24 |
$output = ''; |
25 |
|
26 |
if (!empty($variables['primary'])) { |
27 |
$variables['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>'; |
28 |
$variables['primary']['#prefix'] .= '<ul class="tabs--primary nav nav-tabs">'; |
29 |
$variables['primary']['#suffix'] = '</ul>'; |
30 |
$output .= drupal_render($variables['primary']); |
31 |
} |
32 |
|
33 |
if (!empty($variables['secondary'])) { |
34 |
$variables['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>'; |
35 |
$variables['secondary']['#prefix'] .= '<ul class="tabs--secondary pagination pagination-sm">'; |
36 |
$variables['secondary']['#suffix'] = '</ul>'; |
37 |
$output .= drupal_render($variables['secondary']); |
38 |
} |
39 |
|
40 |
return $output; |
41 |
} |