forked from jtrip/foundation7
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.php
More file actions
executable file
·36 lines (28 loc) · 1.12 KB
/
template.php
File metadata and controls
executable file
·36 lines (28 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* Preprocess function to determine number of columns for main content area
**/
function foundation_preprocess_page(&$variables) {
if ( !empty($variables['page']['left']) && !empty($variables['page']['right']) )
$variables['main_columns'] = 'six';
else if ( !empty($variables['page']['left']) || !empty($variables['page']['right']) )
$variables['main_columns'] = 'nine';
else if ( empty($variables['page']['left']) && empty($variables['page']['right']) )
$variables['main_columns'] = 'twelve';
}
/**
* Overwrite theme_button()
*/
function foundation_button($variables) {
$element = $variables['element'];
$element['#attributes']['type'] = 'submit';
element_set_attributes($element, array('id', 'name', 'value'));
$element['#attributes']['class'][] = 'form-' . $element['#button_type'];
if (!empty($element['#attributes']['disabled'])) {
$element['#attributes']['class'][] = 'form-button-disabled';
}
//custom class
$element['#attributes']['class'][] = 'button';
$element['#attributes']['class'][] = 'small';
return '<input' . drupal_attributes($element['#attributes']) . ' />';
}