-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtocbot.install
63 lines (61 loc) · 3.74 KB
/
tocbot.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
<?php
/**
* @file
* Install file for Tocbot.
*/
/**
* Implements hook_update_N().
*/
function tocbot_update_1000() {
$config = config('tocbot.settings');
$config->set('tocbot_extrabodyclass', update_variable_get('tocbot_extrabodyclass', 'toc-is-active'));
$config->set('tocbot_tocTitle', update_variable_get('tocbot_tocTitle', 'Contents'));
$config->set('tocbot_minActivate', update_variable_get('tocbot_minActivate', '3'));
$config->set('tocbot_createAutoIds', update_variable_get('tocbot_createAutoIds', '1'));
$config->set('tocbot_tocSelector', update_variable_get('tocbot_tocSelector', '.js-toc-block'));
$config->set('tocbot_contentSelector', update_variable_get('tocbot_contentSelector', '.l-content'));
$config->set('tocbot_headingSelector', update_variable_get('tocbot_headingSelector', 'h2, h3, h4, h5, h6'));
$config->set('tocbot_ignoreSelector', update_variable_get('tocbot_ignoreSelector', '.js-toc-ignore'));
$config->set('tocbot_linkClass', update_variable_get('tocbot_linkClass', 'toc-link'));
$config->set('tocbot_extraLinkClasses', update_variable_get('tocbot_extraLinkClasses', ''));
$config->set('tocbot_activeLinkClass', update_variable_get('tocbot_activeLinkClass', 'is-active-link'));
$config->set('tocbot_listClass', update_variable_get('tocbot_listClass', 'toc-list'));
$config->set('tocbot_extraListClasses', update_variable_get('tocbot_extraListClasses', ''));
$config->set('tocbot_isCollapsedClass', update_variable_get('tocbot_isCollapsedClass', 'is-collapsed'));
$config->set('tocbot_collapsibleClass', update_variable_get('tocbot_collapsibleClass', 'is-collapsible'));
$config->set('tocbot_listItemClass', update_variable_get('tocbot_listItemClass', 'toc-list-item'));
$config->set('tocbot_collapseDepth', update_variable_get('tocbot_collapseDepth', '0'));
$config->set('tocbot_orderedList', update_variable_get('tocbot_orderedList', ''));
$config->set('tocbot_scrollSmooth', update_variable_get('tocbot_scrollSmooth', '1'));
$config->set('tocbot_scrollSmoothDuration', update_variable_get('tocbot_scrollSmoothDuration', '420'));
$config->set('tocbot_throttleTimeout', update_variable_get('tocbot_throttleTimeout', '50'));
$config->set('tocbot_positionFixedSelector', update_variable_get('tocbot_positionFixedSelector', '.js-toc-block'));
$config->set('tocbot_positionFixedClass', update_variable_get('tocbot_positionFixedClass', 'is-position-fixed'));
$config->set('tocbot_fixedSidebarOffset', update_variable_get('tocbot_fixedSidebarOffset', 'auto'));
$config->set('tocbot_includeHtml', update_variable_get('tocbot_includeHtml', ''));
update_variable_del('tocbot_extrabodyclass');
update_variable_del('tocbot_tocTitle');
update_variable_del('tocbot_minActivate');
update_variable_del('tocbot_createAutoIds');
update_variable_del('tocbot_tocSelector');
update_variable_del('tocbot_contentSelector');
update_variable_del('tocbot_headingSelector');
update_variable_del('tocbot_ignoreSelector');
update_variable_del('tocbot_linkClass');
update_variable_del('tocbot_extraLinkClasses');
update_variable_del('tocbot_activeLinkClass');
update_variable_del('tocbot_listClass');
update_variable_del('tocbot_extraListClasses');
update_variable_del('tocbot_isCollapsedClass');
update_variable_del('tocbot_collapsibleClass');
update_variable_del('tocbot_listItemClass');
update_variable_del('tocbot_collapseDepth');
update_variable_del('tocbot_orderedList');
update_variable_del('tocbot_scrollSmooth');
update_variable_del('tocbot_scrollSmoothDuration');
update_variable_del('tocbot_throttleTimeout');
update_variable_del('tocbot_positionFixedSelector');
update_variable_del('tocbot_positionFixedClass');
update_variable_del('tocbot_fixedSidebarOffset');
update_variable_del('tocbot_includeHtml');
}