|
1 <?php |
|
2 |
|
3 |
|
4 // Filter to create the sidebar |
|
5 function thematic_sidebar() { |
|
6 |
|
7 $show = TRUE; |
|
8 |
|
9 // Filters should return Boolean |
|
10 $show = apply_filters('thematic_sidebar', $show); |
|
11 |
|
12 if ($show) { |
|
13 get_sidebar();} |
|
14 |
|
15 return; |
|
16 } // end thematic_sidebar |
|
17 |
|
18 |
|
19 // Main Aside Hooks |
|
20 |
|
21 |
|
22 // Located in sidebar.php |
|
23 // Just before the main asides (commonly used as sidebars) |
|
24 function thematic_abovemainasides() { |
|
25 do_action('thematic_abovemainasides'); |
|
26 } // end thematic_abovemainasides |
|
27 |
|
28 |
|
29 // Located in sidebar.php |
|
30 // regular hook for primary asides |
|
31 function widget_area_primary_aside() { |
|
32 do_action('widget_area_primary_aside'); |
|
33 } // end widget_area_primary_aside |
|
34 |
|
35 |
|
36 // Located in sidebar.php |
|
37 // Between the main asides (commonly used as sidebars) |
|
38 function thematic_betweenmainasides() { |
|
39 do_action('thematic_betweenmainasides'); |
|
40 } // end thematic_betweenmainasides |
|
41 |
|
42 |
|
43 // Located in sidebar.php |
|
44 // regular hook for primary asides |
|
45 function widget_area_secondary_aside() { |
|
46 do_action('widget_area_secondary_aside'); |
|
47 } // end widget_area_secondary_aside |
|
48 |
|
49 |
|
50 // Located in sidebar.php |
|
51 // after the main asides (commonly used as sidebars) |
|
52 function thematic_belowmainasides() { |
|
53 do_action('thematic_belowmainasides'); |
|
54 } // end thematic_belowmainasides |
|
55 |
|
56 |
|
57 // Index Aside Hooks |
|
58 |
|
59 |
|
60 // Located in sidebar-index-top.php |
|
61 function thematic_aboveindextop() { |
|
62 do_action('thematic_aboveindextop'); |
|
63 } // end thematic_aboveindextop |
|
64 |
|
65 |
|
66 // Located in sidebar-index-top.php |
|
67 function widget_area_index_top() { |
|
68 do_action('widget_area_index_top'); |
|
69 } // end widget_area_index_top |
|
70 |
|
71 |
|
72 // Located in sidebar-index-top.php |
|
73 function thematic_belowindextop() { |
|
74 do_action('thematic_belowindextop'); |
|
75 } // end thematic_belowindextop |
|
76 |
|
77 |
|
78 // Located in sidebar-index-insert.php |
|
79 function thematic_aboveindexinsert() { |
|
80 do_action('thematic_aboveindexinsert'); |
|
81 } // end thematic_aboveindexinsert |
|
82 |
|
83 // ocated in sidebar-index-insert.php |
|
84 function widget_area_index_insert() { |
|
85 do_action('widget_area_index_insert'); |
|
86 } // end widget_area_index_insert |
|
87 |
|
88 |
|
89 // Located in sidebar-index-insert.php |
|
90 function thematic_belowindexinsert() { |
|
91 do_action('thematic_belowindexinsert'); |
|
92 } // end thematic_belowindexinsert |
|
93 |
|
94 |
|
95 // Located in sidebar-index-bottom.php |
|
96 function thematic_aboveindexbottom() { |
|
97 do_action('thematic_aboveindexbottom'); |
|
98 } // end thematic_aboveindexbottom |
|
99 |
|
100 // Located in sidebar-index-bottom.php |
|
101 function widget_area_index_bottom() { |
|
102 do_action('widget_area_index_bottom'); |
|
103 } // end widget_area_index_bottom |
|
104 |
|
105 |
|
106 // Located in sidebar-index-bottom.php |
|
107 function thematic_belowindexbottom() { |
|
108 do_action('thematic_belowindexbottom'); |
|
109 } // end thematic_belowindexbottom |
|
110 |
|
111 |
|
112 // Single Post Asides |
|
113 |
|
114 |
|
115 // Located in sidebar-single-top.php |
|
116 function thematic_abovesingletop() { |
|
117 do_action('thematic_abovesingletop'); |
|
118 } // end thematic_abovesingletop |
|
119 |
|
120 |
|
121 // Located in sidebar-single-top.php |
|
122 function widget_area_single_top() { |
|
123 do_action('widget_area_single_top'); |
|
124 } // end thematic_abovesingletop |
|
125 |
|
126 |
|
127 // Located in sidebar-single-top.php |
|
128 function thematic_belowsingletop() { |
|
129 do_action('thematic_belowsingletop'); |
|
130 } // end thematic_belowsingletop |
|
131 |
|
132 |
|
133 // Located in sidebar-single-insert.php |
|
134 function thematic_abovesingleinsert() { |
|
135 do_action('thematic_abovesingleinsert'); |
|
136 } // end thematic_abovesingleinsert |
|
137 |
|
138 |
|
139 // Located in sidebar-single-insert.php |
|
140 function widget_area_single_insert() { |
|
141 do_action('widget_area_single_insert'); |
|
142 } // end thematic_abovesingleinsert |
|
143 |
|
144 |
|
145 // Located in sidebar-single-insert.php |
|
146 function thematic_belowsingleinsert() { |
|
147 do_action('thematic_belowsingleinsert'); |
|
148 } // end thematic_belowsingleinsert |
|
149 |
|
150 |
|
151 // Located in sidebar-single-bottom.php |
|
152 function thematic_abovesinglebottom() { |
|
153 do_action('thematic_abovesinglebottom'); |
|
154 } // end thematic_abovesinglebottom |
|
155 |
|
156 |
|
157 // Located in sidebar-single-bottom.php |
|
158 function widget_area_single_bottom() { |
|
159 do_action('widget_area_single_bottom'); |
|
160 } // end widget_area_single_bottom |
|
161 |
|
162 |
|
163 // Located in sidebar-single-bottom.php |
|
164 function thematic_belowsinglebottom() { |
|
165 do_action('thematic_belowsinglebottom'); |
|
166 } // end thematic_belowsinglebottom |
|
167 |
|
168 |
|
169 |
|
170 // Page Aside Hooks |
|
171 |
|
172 |
|
173 // Located in sidebar-page-top.php |
|
174 function thematic_abovepagetop() { |
|
175 do_action('thematic_abovepagetop'); |
|
176 } // end thematic_abovepagetop |
|
177 |
|
178 |
|
179 // Located in sidebar-page-top.php |
|
180 function widget_area_page_top() { |
|
181 do_action('widget_area_page_top'); |
|
182 } // end widget_area_page_top |
|
183 |
|
184 |
|
185 // Located in sidebar-page-top.php |
|
186 function thematic_belowpagetop() { |
|
187 do_action('thematic_belowpagetop'); |
|
188 } // end thematic_belowpagetop |
|
189 |
|
190 |
|
191 // Located in sidebar-page-bottom.php |
|
192 function thematic_abovepagebottom() { |
|
193 do_action('thematic_abovepagebottom'); |
|
194 } // end thematic_abovepagebottom |
|
195 |
|
196 |
|
197 // Located in sidebar-page-bottom.php |
|
198 function widget_area_page_bottom() { |
|
199 do_action('widget_area_page_bottom'); |
|
200 } // end widget_area_page_bottom |
|
201 |
|
202 |
|
203 // Located in sidebar-page-bottom.php |
|
204 function thematic_belowpagebottom() { |
|
205 do_action('thematic_belowpagebottom'); |
|
206 } // end thematic_belowpagebottom |
|
207 |
|
208 |
|
209 |
|
210 // Subsidiary Aside Hooks |
|
211 |
|
212 |
|
213 // Located in sidebar-subsidiary.php |
|
214 function thematic_abovesubasides() { |
|
215 do_action('thematic_abovesubasides'); |
|
216 } // end thematic_abovesubasides |
|
217 |
|
218 |
|
219 // Located in sidebar-subsidiary.php |
|
220 function thematic_belowsubasides() { |
|
221 do_action('thematic_belowsubasides'); |
|
222 } // end thematic_belowsubasides |
|
223 |
|
224 function thematic_subsidiaryopen() { |
|
225 if ( is_sidebar_active('1st-subsidiary-aside') || is_sidebar_active('2nd-subsidiary-aside') || is_sidebar_active('3rd-subsidiary-aside') ) { // one of the subsidiary asides has a widget ?> |
|
226 |
|
227 <div id="subsidiary"> |
|
228 |
|
229 <?php |
|
230 } |
|
231 } |
|
232 add_action('widget_area_subsidiaries', 'thematic_subsidiaryopen', 10); |
|
233 |
|
234 |
|
235 // Located in sidebar-subsidiary.php |
|
236 function thematic_before_first_sub() { |
|
237 do_action('thematic_before_first_sub'); |
|
238 } // end thematic_before_first_sub |
|
239 |
|
240 function add_before_first_sub() { |
|
241 if ( is_sidebar_active('1st-subsidiary-aside') || is_sidebar_active('2nd-subsidiary-aside') || is_sidebar_active('3rd-subsidiary-aside') ) { // one of the subsidiary asides has a widget |
|
242 thematic_before_first_sub(); |
|
243 } |
|
244 } |
|
245 add_action('widget_area_subsidiaries', 'add_before_first_sub',20); |
|
246 |
|
247 // Located in sidebar-subsidiary.php |
|
248 function widget_area_subsidiaries() { |
|
249 do_action('widget_area_subsidiaries'); |
|
250 } // end widget_area_1st_subsidiary_aside |
|
251 |
|
252 // Located in sidebar-subsidiary.php |
|
253 function thematic_between_firstsecond_sub() { |
|
254 do_action('thematic_between_firstsecond_sub'); |
|
255 } // end thematic_between_firstsecond_sub |
|
256 |
|
257 function add_between_firstsecond_sub() { |
|
258 if ( is_sidebar_active('1st-subsidiary-aside') || is_sidebar_active('2nd-subsidiary-aside') || is_sidebar_active('3rd-subsidiary-aside') ) { // one of the subsidiary asides has a widget |
|
259 thematic_between_firstsecond_sub(); |
|
260 } |
|
261 } |
|
262 add_action('widget_area_subsidiaries', 'add_between_firstsecond_sub',40); |
|
263 |
|
264 |
|
265 // Located in sidebar-subsidiary.php |
|
266 function thematic_between_secondthird_sub() { |
|
267 do_action('thematic_between_secondthird_sub'); |
|
268 } // end thematic_between_secondthird_sub |
|
269 |
|
270 function add_between_secondthird_sub() { |
|
271 if ( is_sidebar_active('1st-subsidiary-aside') || is_sidebar_active('2nd-subsidiary-aside') || is_sidebar_active('3rd-subsidiary-aside') ) { // one of the subsidiary asides has a widget |
|
272 thematic_between_secondthird_sub(); |
|
273 } |
|
274 } |
|
275 add_action('widget_area_subsidiaries', 'add_between_secondthird_sub',60); |
|
276 |
|
277 |
|
278 // Located in sidebar-subsidiary.php |
|
279 function thematic_after_third_sub() { |
|
280 do_action('thematic_after_third_sub'); |
|
281 } // end thematic_after_third_sub |
|
282 |
|
283 |
|
284 function add_after_third_sub() { |
|
285 if ( is_sidebar_active('1st-subsidiary-aside') || is_sidebar_active('2nd-subsidiary-aside') || is_sidebar_active('3rd-subsidiary-aside') ) { // one of the subsidiary asides has a widget |
|
286 thematic_after_third_sub(); |
|
287 } |
|
288 } |
|
289 add_action('widget_area_subsidiaries', 'add_after_third_sub',80); |
|
290 |
|
291 function thematic_subsidiaryclose() { |
|
292 if ( is_sidebar_active('1st-subsidiary-aside') || is_sidebar_active('2nd-subsidiary-aside') || is_sidebar_active('3rd-subsidiary-aside') ) { // one of the subsidiary asides has a widget ?> |
|
293 |
|
294 </div><!-- #subsidiary --> |
|
295 |
|
296 <?php |
|
297 } |
|
298 } |
|
299 add_action('widget_area_subsidiaries', 'thematic_subsidiaryclose', 200); |