Projet

Général

Profil

Révision 7547bb19

Ajouté par Assos Assos il y a environ 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-action.func.php
22 22
 */
23 23
function bootstrap_menu_local_action($variables) {
24 24
  $link = $variables['element']['#link'];
25
  $title = $link['title'];
25

  
26
  $options = isset($link['localized_options']) ? $link['localized_options'] : array();
27

  
28
  // Filter the title if the "html" is set, otherwise l() will automatically
29
  // sanitize using check_plain(), so no need to call that here.
30
  $title = empty($options['html']) ? filter_xss_admin($link['title']) : $link['title'];
31

  
26 32
  $icon = _bootstrap_iconize_text($title);
27 33
  $href = !empty($link['href']) ? $link['href'] : FALSE;
28
  $options = isset($link['localized_options']) ? $link['localized_options'] : array();
29 34

  
30 35
  // Format the action link.
31 36
  if ($href) {
......
49 54
    $options['html'] = !empty($options['html']) || !empty($icon) ? TRUE : FALSE;
50 55
  }
51 56

  
52
  // Filter the title if the "html" is set, otherwise l() will automatically
53
  // sanitize using check_plain(), so no need to call that here.
54
  if (!empty($options['html'])) {
55
    $title = _bootstrap_filter_xss($title);
56
  }
57

  
58 57
  return $href ? l($icon . $title, $href, $options) : $icon . $title;
59 58
}

Formats disponibles : Unified diff