root / drupal7 / sites / all / themes / bootstrap / theme / system / table.vars.php @ 87dbc3bf
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* @file
|
4 |
* table.vars.php
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
* Implements hook_preprocess_table().
|
9 |
*/
|
10 |
function bootstrap_preprocess_table(&$variables) { |
11 |
if (isset($variables['attributes']['class']) && is_string($variables['attributes']['class'])) { |
12 |
// Convert classes to an array.
|
13 |
$variables['attributes']['class'] = explode(' ', $variables['attributes']['class']); |
14 |
} |
15 |
$variables['attributes']['class'][] = 'table'; |
16 |
if (!in_array('table-no-striping', $variables['attributes']['class'])) { |
17 |
$variables['attributes']['class'][] = 'table-striped'; |
18 |
} |
19 |
} |