1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* LSX functions and definitions - Hooks. |
4
|
|
|
* |
5
|
|
|
* @package lsx |
6
|
|
|
* @subpackage hooks |
7
|
|
|
*/ |
8
|
|
|
|
9
|
|
|
if ( ! defined( 'ABSPATH' ) ) { |
10
|
|
|
exit; |
11
|
|
|
} |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* This is the 1st action in the theme that fires after <head>. |
15
|
|
|
*/ |
16
|
|
|
function lsx_head_top() { |
17
|
|
|
do_action( 'lsx_head_top' ); |
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* This is the 2nd action that fires before wp_head() and </head>. |
22
|
|
|
* |
23
|
|
|
* @return void |
24
|
|
|
*/ |
25
|
|
|
function lsx_head_bottom() { |
26
|
|
|
do_action( 'lsx_head_bottom' ); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* The 3rd action thta fires after <body> |
31
|
|
|
*/ |
32
|
|
|
function lsx_body_top() { |
33
|
|
|
do_action( 'lsx_body_top' ); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* The 4th action that fires after <div class="header-wrap">. |
38
|
|
|
* |
39
|
|
|
* $lsx_supports[] = 'header'; |
40
|
|
|
*/ |
41
|
|
|
function lsx_header_before() { |
42
|
|
|
do_action( 'lsx_header_before' ); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* The 5th action that fires after <header> |
47
|
|
|
* |
48
|
|
|
* @return void |
49
|
|
|
*/ |
50
|
|
|
function lsx_header_top() { |
51
|
|
|
do_action( 'lsx_header_top' ); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* The 6th action fires before lsx_nav_menu(). |
56
|
|
|
* |
57
|
|
|
* @return void |
58
|
|
|
*/ |
59
|
|
|
function lsx_nav_before() { |
60
|
|
|
do_action( 'lsx_nav_before' ); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* The 7th action fires after lsx_nav_menu(). |
65
|
|
|
* |
66
|
|
|
* @return void |
67
|
|
|
*/ |
68
|
|
|
function lsx_nav_after() { |
69
|
|
|
do_action( 'lsx_nav_after' ); |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* The 8th action that fires directly after lsx_nav_after(). |
74
|
|
|
* |
75
|
|
|
* @return void |
76
|
|
|
*/ |
77
|
|
|
function lsx_header_bottom() { |
78
|
|
|
do_action( 'lsx_header_bottom' ); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* The 9th action that fires directly after </header>. |
83
|
|
|
* |
84
|
|
|
* @return void |
85
|
|
|
*/ |
86
|
|
|
function lsx_header_after() { |
87
|
|
|
do_action( 'lsx_header_after' ); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* The 10th action which fires before the <div class="wrap container" role="document" tabindex="-1">. |
92
|
|
|
* |
93
|
|
|
* @return void |
94
|
|
|
*/ |
95
|
|
|
function lsx_header_wrap_after() { |
96
|
|
|
do_action( 'lsx_header_wrap_after' ); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* The 10th action which fires before the <div class="wrap container" role="document" tabindex="-1">. |
101
|
|
|
* |
102
|
|
|
* @return void |
103
|
|
|
*/ |
104
|
|
|
function lsx_header_wrap_container_top() { |
105
|
|
|
do_action( 'lsx_header_wrap_container_top' ); |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* Body Bottom |
110
|
|
|
* |
111
|
|
|
* @return void |
112
|
|
|
*/ |
113
|
|
|
function lsx_body_bottom() { |
114
|
|
|
do_action( 'lsx_body_bottom' ); |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* Semantic <content> hooks |
119
|
|
|
* |
120
|
|
|
* $lsx_supports[] = 'banner'; |
121
|
|
|
*/ |
122
|
|
|
function lsx_banner_content() { |
123
|
|
|
do_action( 'lsx_banner_content' ); |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* Banner Inner top |
128
|
|
|
* |
129
|
|
|
* @return void |
130
|
|
|
*/ |
131
|
|
|
function lsx_banner_inner_top() { |
132
|
|
|
do_action( 'lsx_banner_inner_top' ); |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* Banner Inner bottom |
137
|
|
|
* |
138
|
|
|
* @return void |
139
|
|
|
*/ |
140
|
|
|
function lsx_banner_inner_bottom() { |
141
|
|
|
do_action( 'lsx_banner_inner_bottom' ); |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Semantic <content> hooks |
146
|
|
|
* |
147
|
|
|
* $lsx_supports[] = 'global_header'; |
148
|
|
|
*/ |
149
|
|
|
function lsx_global_header_inner_bottom() { |
150
|
|
|
do_action( 'lsx_global_header_inner_bottom' ); |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* Semantic <content> hooks |
155
|
|
|
* |
156
|
|
|
* $lsx_supports[] = 'content'; |
157
|
|
|
*/ |
158
|
|
|
function lsx_content_wrap_before() { |
159
|
|
|
do_action( 'lsx_content_wrap_before' ); |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* Content Wrap After |
164
|
|
|
* |
165
|
|
|
* @return void |
166
|
|
|
*/ |
167
|
|
|
function lsx_content_wrap_after() { |
168
|
|
|
do_action( 'lsx_content_wrap_after' ); |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* Content before |
173
|
|
|
* |
174
|
|
|
* @return void |
175
|
|
|
*/ |
176
|
|
|
function lsx_content_before() { |
177
|
|
|
do_action( 'lsx_content_before' ); |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* Content After |
182
|
|
|
* |
183
|
|
|
* @return void |
184
|
|
|
*/ |
185
|
|
|
function lsx_content_after() { |
186
|
|
|
do_action( 'lsx_content_after' ); |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* Content Top |
191
|
|
|
* |
192
|
|
|
* @return void |
193
|
|
|
*/ |
194
|
|
|
function lsx_content_top() { |
195
|
|
|
do_action( 'lsx_content_top' ); |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* Content Bottom |
200
|
|
|
* |
201
|
|
|
* @return void |
202
|
|
|
*/ |
203
|
|
|
function lsx_content_bottom() { |
204
|
|
|
do_action( 'lsx_content_bottom' ); |
205
|
|
|
} |
206
|
|
|
|
207
|
|
|
/** |
208
|
|
|
* Content Post tags |
209
|
|
|
* |
210
|
|
|
* @return void |
211
|
|
|
*/ |
212
|
|
|
function lsx_content_post_tags() { |
213
|
|
|
do_action( 'lsx_content_post_tags' ); |
214
|
|
|
} |
215
|
|
|
|
216
|
|
|
/** |
217
|
|
|
* Content Sharing |
218
|
|
|
* |
219
|
|
|
* @return void |
220
|
|
|
*/ |
221
|
|
|
function lsx_content_sharing() { |
222
|
|
|
do_action( 'lsx_content_sharing' ); |
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* Semantic <entry> hooks |
227
|
|
|
* |
228
|
|
|
* $lsx_supports[] = 'entry'; |
229
|
|
|
*/ |
230
|
|
|
function lsx_entry_before() { |
231
|
|
|
do_action( 'lsx_entry_before' ); |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
/** |
235
|
|
|
* Entry After |
236
|
|
|
* |
237
|
|
|
* @return void |
238
|
|
|
*/ |
239
|
|
|
function lsx_entry_after() { |
240
|
|
|
do_action( 'lsx_entry_after' ); |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* Entry Top |
245
|
|
|
* |
246
|
|
|
* @return void |
247
|
|
|
*/ |
248
|
|
|
function lsx_entry_top() { |
249
|
|
|
do_action( 'lsx_entry_top' ); |
250
|
|
|
} |
251
|
|
|
|
252
|
|
|
/** |
253
|
|
|
* Entry Inside Top |
254
|
|
|
* |
255
|
|
|
* @return void |
256
|
|
|
*/ |
257
|
|
|
function lsx_entry_inside_top() { |
258
|
|
|
do_action( 'lsx_entry_inside_top' ); |
259
|
|
|
} |
260
|
|
|
|
261
|
|
|
/** |
262
|
|
|
* Entry Bottom |
263
|
|
|
* |
264
|
|
|
* @return void |
265
|
|
|
*/ |
266
|
|
|
function lsx_entry_bottom() { |
267
|
|
|
do_action( 'lsx_entry_bottom' ); |
268
|
|
|
} |
269
|
|
|
|
270
|
|
|
/** |
271
|
|
|
* Semantic <entry> hooks |
272
|
|
|
*/ |
273
|
|
|
function lsx_post_meta_top() { |
274
|
|
|
do_action( 'lsx_post_meta_top' ); |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* Widget Semantic <entry> hooks |
279
|
|
|
* |
280
|
|
|
* $lsx_supports[] = 'entry'; |
281
|
|
|
*/ |
282
|
|
|
function lsx_widget_entry_before() { |
283
|
|
|
do_action( 'lsx_widget_entry_before' ); |
284
|
|
|
} |
285
|
|
|
|
286
|
|
|
/** |
287
|
|
|
* Widget Entry after |
288
|
|
|
* |
289
|
|
|
* @return void |
290
|
|
|
*/ |
291
|
|
|
function lsx_widget_entry_after() { |
292
|
|
|
do_action( 'lsx_widget_entry_after' ); |
293
|
|
|
} |
294
|
|
|
|
295
|
|
|
/** |
296
|
|
|
* Widget Entry Top |
297
|
|
|
* |
298
|
|
|
* @return void |
299
|
|
|
*/ |
300
|
|
|
function lsx_widget_entry_top() { |
301
|
|
|
do_action( 'lsx_widget_entry_top' ); |
302
|
|
|
} |
303
|
|
|
|
304
|
|
|
/** |
305
|
|
|
* Widget Entry Bottom |
306
|
|
|
* |
307
|
|
|
* @return void |
308
|
|
|
*/ |
309
|
|
|
function lsx_widget_entry_bottom() { |
310
|
|
|
do_action( 'lsx_widget_entry_bottom' ); |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* Widget entry content |
315
|
|
|
* |
316
|
|
|
* @return void |
317
|
|
|
*/ |
318
|
|
|
function lsx_widget_entry_content_top() { |
319
|
|
|
do_action( 'lsx_widget_entry_content_top' ); |
320
|
|
|
} |
321
|
|
|
|
322
|
|
|
/** |
323
|
|
|
* Widget Entry content bottom |
324
|
|
|
* |
325
|
|
|
* @return void |
326
|
|
|
*/ |
327
|
|
|
function lsx_widget_entry_content_bottom() { |
328
|
|
|
do_action( 'lsx_widget_entry_content_bottom' ); |
329
|
|
|
} |
330
|
|
|
|
331
|
|
|
/** |
332
|
|
|
* Comments block hooks |
333
|
|
|
* |
334
|
|
|
* $lsx_supports[] = 'comments'; |
335
|
|
|
*/ |
336
|
|
|
function lsx_comments_before() { |
337
|
|
|
do_action( 'lsx_comments_before' ); |
338
|
|
|
} |
339
|
|
|
|
340
|
|
|
/** |
341
|
|
|
* Comment After |
342
|
|
|
* |
343
|
|
|
* @return void |
344
|
|
|
*/ |
345
|
|
|
function lsx_comments_after() { |
346
|
|
|
do_action( 'lsx_comments_after' ); |
347
|
|
|
} |
348
|
|
|
|
349
|
|
|
/** |
350
|
|
|
* Semantic <sidebar> hooks |
351
|
|
|
* |
352
|
|
|
* $lsx_supports[] = 'sidebar'; |
353
|
|
|
*/ |
354
|
|
|
function lsx_sidebars_before() { |
355
|
|
|
do_action( 'lsx_sidebars_before' ); |
356
|
|
|
} |
357
|
|
|
|
358
|
|
|
/** |
359
|
|
|
* Sidebar After |
360
|
|
|
* |
361
|
|
|
* @return void |
362
|
|
|
*/ |
363
|
|
|
function lsx_sidebars_after() { |
364
|
|
|
do_action( 'lsx_sidebars_after' ); |
365
|
|
|
} |
366
|
|
|
|
367
|
|
|
/** |
368
|
|
|
* Sidebar Top |
369
|
|
|
* |
370
|
|
|
* @return void |
371
|
|
|
*/ |
372
|
|
|
function lsx_sidebar_top() { |
373
|
|
|
do_action( 'lsx_sidebar_top' ); |
374
|
|
|
} |
375
|
|
|
|
376
|
|
|
/** |
377
|
|
|
* Sidebar Bottom |
378
|
|
|
* |
379
|
|
|
* @return void |
380
|
|
|
*/ |
381
|
|
|
function lsx_sidebar_bottom() { |
382
|
|
|
do_action( 'lsx_sidebar_bottom' ); |
383
|
|
|
} |
384
|
|
|
|
385
|
|
|
/** |
386
|
|
|
* Semantic <footer> hooks |
387
|
|
|
* |
388
|
|
|
* $lsx_supports[] = 'footer'; |
389
|
|
|
*/ |
390
|
|
|
function lsx_footer_before() { |
391
|
|
|
do_action( 'lsx_footer_before' ); |
392
|
|
|
} |
393
|
|
|
|
394
|
|
|
/** |
395
|
|
|
* Footer After |
396
|
|
|
* |
397
|
|
|
* @return void |
398
|
|
|
*/ |
399
|
|
|
function lsx_footer_after() { |
400
|
|
|
do_action( 'lsx_footer_after' ); |
401
|
|
|
} |
402
|
|
|
|
403
|
|
|
/** |
404
|
|
|
* Footer Top |
405
|
|
|
* |
406
|
|
|
* @return void |
407
|
|
|
*/ |
408
|
|
|
function lsx_footer_top() { |
409
|
|
|
do_action( 'lsx_footer_top' ); |
410
|
|
|
} |
411
|
|
|
|
412
|
|
|
/** |
413
|
|
|
* Footer Bottom |
414
|
|
|
* |
415
|
|
|
* @return void |
416
|
|
|
*/ |
417
|
|
|
function lsx_footer_bottom() { |
418
|
|
|
do_action( 'lsx_footer_bottom' ); |
419
|
|
|
} |
420
|
|
|
|