root / drupal7 / sites / all / themes / bootstrap / templates / block / block.vars.php @ 7547bb19
1 | caf16a48 | Assos Assos | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * Stub file for "block" theme hook [pre]process functions.
|
||
5 | */
|
||
6 | |||
7 | /**
|
||
8 | * Pre-processes variables for the "block" theme hook.
|
||
9 | *
|
||
10 | * See template for list of available variables.
|
||
11 | *
|
||
12 | * @see block.tpl.php
|
||
13 | *
|
||
14 | * @ingroup theme_preprocess
|
||
15 | */
|
||
16 | function bootstrap_preprocess_block(&$variables) { |
||
17 | // Use a bare template for the page's main content.
|
||
18 | if ($variables['block_html_id'] == 'block-system-main') { |
||
19 | $variables['theme_hook_suggestions'][] = 'block__no_wrapper'; |
||
20 | } |
||
21 | $variables['title_attributes_array']['class'][] = 'block-title'; |
||
22 | } |
||
23 | |||
24 | /**
|
||
25 | * Processes variables for the "block" theme hook.
|
||
26 | *
|
||
27 | * See template for list of available variables.
|
||
28 | *
|
||
29 | * @see block.tpl.php
|
||
30 | *
|
||
31 | * @ingroup theme_process
|
||
32 | */
|
||
33 | function bootstrap_process_block(&$variables) { |
||
34 | // Drupal 7 should use a $title variable instead of $block->subject.
|
||
35 | // Don't override an existing "title" variable, some modules may already it.
|
||
36 | if (!isset($variables['title'])) { |
||
37 | $variables['title'] = $variables['block']->subject; |
||
38 | } |
||
39 | 7547bb19 | Assos Assos | $variables['title'] = filter_xss_admin($variables['title']); |
40 | caf16a48 | Assos Assos | } |