Projet

Général

Profil

Paste
Télécharger (697 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / ctools / includes / action-links.theme.inc @ e4c061ad

1
<?php
2
/**
3
 * @file
4
 * Theme function for wrapping menu local actions.
5
 */
6

    
7
/**
8
 * Delegated implementation of hook_theme()
9
 */
10
function ctools_action_links_theme(&$items) {
11
  $items['ctools_menu_local_actions_wrapper'] = array(
12
    'render element' => 'links',
13
    'file' => 'includes/action-links.theme.inc',
14
  );
15
}
16

    
17
/**
18
 * Render a menu local actions wrapper.
19
 *
20
 * @param $links
21
 *   Local actions links.
22
 * @param $attributes
23
 *   An array of attributes to append to the wrapper.
24
 */
25
function theme_ctools_menu_local_actions_wrapper($variables) {
26
  $links = drupal_render($variables['links']);
27

    
28
  if (empty($links)) {
29
    return;
30
  }
31

    
32
  return '<ul class="action-links">' . $links . '</ul>';
33
}