-
Notifications
You must be signed in to change notification settings - Fork 0
/
extension_settings.install
56 lines (50 loc) · 1.51 KB
/
extension_settings.install
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* @file extension_settings_install
*
* Install default settings for the extension_settings
*
*/
function extension_settings_install(){
$top_hat_settings = array(
'hide_utility' => 1,
'show_search' => 0,
'vso_option' => 0,
'num_links' => 1,
);
variable_set('extension_top_hat_settings', $top_hat_settings);
// note: the closing heredoc identifier cannot be indented
$default_address = <<< DEFAULT
Extension & Experiment<br /> Station Communications<br />
422 Kerr Administration<br />
Corvallis, OR 97331<br />
<br />
(541) 737-3311
DEFAULT;
$footer_settings = array(
'contact' => array(
'address' => $default_address,
'webmaster' => array(),
),
'social_media' => array(
'facebook' => array(),
'youtube' => array(),
'flickr' => array(),
'linkedin' => array(),
'twitter' => array(),
'google' => array(),
),
);
variable_set('extension_footer_settings', $footer_settings);
}
function extension_settings_uninstall() {
variable_del('extension_top_hat_settings');
variable_del('extension_footer_settings');
}
function extension_settings_block_info_alter(&$blocks, $theme, $code_blocks) {
// Disable the login block. --wat?
$blocks['extension_settings']['extension_top_hat']['css_class'] = 'span2';
$blocks['extension_settings']['extension_top_hat_links']['css_class'] = 'span2';
$blocks['extension_settings']['extension_footer']['css_class'] = 'span2';
$blocks['extension_settings']['extension_social_media']['css_class'] = 'span2';
}