-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
executable file
·124 lines (115 loc) · 3.54 KB
/
functions.php
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?php
add_action('tha_head_top', 'rsc_head_top');
function rsc_head_top() {
echo '<!-- HOOK: tha_head_top -->';
}
add_action('tha_head_bottom', 'rsc_head_bottom');
function rsc_head_bottom() {
echo '<!-- HOOK: tha_head_bottom -->';
}
add_action('tha_header_before', 'rsc_header_before');
function rsc_header_before() {
rsc_hook_html('tha_header_before');
}
add_action('tha_header_after', 'rsc_header_after');
function rsc_header_after() {
rsc_hook_html('tha_header_after');
}
add_action('tha_header_top', 'rsc_header_top');
function rsc_header_top() {
rsc_hook_html('tha_header_top');
}
add_action('tha_header_bottom', 'rsc_header_bottom');
function rsc_header_bottom() {
rsc_hook_html('tha_header_bottom');
}
add_action('tha_content_before', 'rsc_content_before');
function rsc_content_before() {
rsc_hook_html('tha_content_before');
}
add_action('tha_content_after', 'rsc_content_after');
function rsc_content_after() {
rsc_hook_html('tha_content_after');
}
add_action('tha_content_top', 'rsc_content_top');
function rsc_content_top() {
rsc_hook_html('tha_content_top');
?>
<div class="alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Suggestion!</strong> Check the source of <head> to see what the script and style SRCs are like.
</div>
<?php
}
add_action('tha_content_bottom', 'rsc_content_bottom');
function rsc_content_bottom() {
rsc_hook_html('tha_content_bottom');
}
add_action('tha_entry_before', 'rsc_entry_before');
function rsc_entry_before() {
rsc_hook_html('tha_entry_before');
}
add_action('tha_entry_after', 'rsc_entry_after');
function rsc_entry_after() {
rsc_hook_html('tha_entry_after');
}
add_action('tha_entry_top', 'rsc_entry_top');
function rsc_entry_top() {
rsc_hook_html('tha_entry_top');
}
add_action('tha_entry_bottom', 'rsc_entry_bottom');
function rsc_entry_bottom() {
rsc_hook_html('tha_entry_bottom');
}
add_action('tha_comments_before', 'rsc_comments_before');
function rsc_comments_before() {
rsc_hook_html('tha_comments_before');
}
add_action('tha_comments_after', 'rsc_comments_after');
function rsc_comments_after() {
rsc_hook_html('tha_comments_after');
}
add_action('tha_sidebars_before', 'rsc_sidebars_before');
function rsc_sidebars_before() {
rsc_hook_html('tha_sidebars_before');
}
add_action('tha_sidebars_after', 'rsc_sidebars_after');
function rsc_sidebars_after() {
rsc_hook_html('tha_sidebars_after');
}
add_action('tha_sidebars_top', 'rsc_sidebars_top');
function rsc_sidebars_top() {
rsc_hook_html('tha_sidebars_top');
}
add_action('tha_sidebars_bottom', 'rsc_sidebars_bottom');
function rsc_sidebars_bottom() {
rsc_hook_html('tha_sidebars_bottom');
}
add_action('tha_footer_before', 'rsc_footer_before');
function rsc_footer_before() {
rsc_hook_html('tha_footer_before');
}
add_action('tha_footer_after', 'rsc_footer_after');
function rsc_footer_after() {
rsc_hook_html('tha_footer_after');
}
add_action('tha_footer_top', 'rsc_footer_top');
function rsc_footer_top() {
rsc_hook_html('tha_footer_top');
}
add_action('tha_footer_bottom', 'rsc_footer_bottom');
function rsc_footer_bottom() {
rsc_hook_html('tha_footer_bottom');
}
function rsc_hook_html($content) {
echo '<pre class="hook ' . $content . '">' . $content . '</pre>';
}
add_action('init', 'rsc_init');
function rsc_init() {
remove_theme_support('bootstrap-top-navbar');
}
add_action('wp_enqueue_scripts', 'rsc_enqueue_scripts');
function rsc_enqueue_scripts() {
wp_enqueue_script('jquery');
wp_enqueue_script('rsc_script', get_stylesheet_directory_uri() . '/script.js', array('jquery'));
}