This repository has been archived by the owner on May 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
w0bw0b_profile.install
71 lines (68 loc) · 1.64 KB
/
w0bw0b_profile.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Implements hook_install().
*/
function w0bw0b_profile_install() {
// Add text formats.
$filtered_html_format = array(
'format' => 'filtered_html',
'name' => 'Filtered HTML',
'weight' => 0,
'filters' => array(
// URL filter.
'filter_url' => array(
'weight' => 0,
'status' => 1,
),
// HTML filter.
'filter_html' => array(
'weight' => 1,
'status' => 1,
),
// Line break filter.
'filter_autop' => array(
'weight' => 2,
'status' => 1,
),
// HTML corrector filter.
'filter_htmlcorrector' => array(
'weight' => 10,
'status' => 1,
),
),
);
$filtered_html_format = (object) $filtered_html_format;
filter_format_save($filtered_html_format);
$default_theme = 'wob_theme';
theme_enable(array('cssgrid', $default_theme));
variable_set('theme_default', $default_theme);
$blocks = array(
array(
'module' => 'block',
'delta' => '1',
'theme' => $default_theme,
'status' => 1,
'weight' => 0,
'region' => 'footer',
'pages' => '',
'title' => '<none>',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'user-menu',
'theme' => $default_theme,
'status' => 1,
'weight' => -1,
'region' => 'header',
'pages' => '',
'title' => '<none>',
'cache' => -1,
),
);
$query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'title', 'cache'));
foreach ($blocks as $block) {
$query->values($block);
}
$query->execute();
}