Projet

Général

Profil

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

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

1
<?php
2

    
3
/**
4
 * @file
5
 * Theme function for wrapping menu local actions.
6
 */
7

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

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

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

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