Projet

Général

Profil

Paste
Télécharger (1,01 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / theme / bootstrap / bootstrap-modal.vars.php @ 87dbc3bf

1
<?php
2
/**
3
 * @file
4
 * bootstrap-modal.vars.php
5
 */
6

    
7
/**
8
 * Implements theme_preprocess_bootstrap_modal().
9
 *
10
 * @todo: Replace with "bootstrap_effect_fade" theme setting.
11
 */
12
function bootstrap_preprocess_bootstrap_modal(&$variables) {
13
  if (empty($variables['attributes']['id'])) {
14
    $variables['attributes']['id'] = drupal_html_id(strip_tags($variables['heading']));
15
  }
16
  $variables['attributes']['class'][] = 'modal';
17
  $variables['attributes']['class'][] = 'fade';
18
  $variables['attributes']['tabindex'] = -1;
19
  $variables['attributes']['role'] = 'dialog';
20
  $variables['attributes']['aria-hidden'] = 'true';
21

    
22
  $variables['heading'] = $variables['html_heading'] ? $variables['heading'] : check_plain($variables['heading']);
23
}
24

    
25
/**
26
 * Implements theme_process_bootstrap_modal().
27
 */
28
function bootstrap_process_bootstrap_modal(&$variables) {
29
  $variables['attributes'] = drupal_attributes($variables['attributes']);
30
  $variables['body'] = render($variables['body']);
31
  $variables['footer'] = render($variables['footer']);
32
}