-
Notifications
You must be signed in to change notification settings - Fork 1
/
after.php
46 lines (35 loc) · 861 Bytes
/
after.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
<?php
function mantis_after_html()
{
ob_start();
dynamic_sidebar('mantis_after_content');
$html = ob_get_contents();
ob_end_clean();
return $html;
}
function mantis_after_content($content)
{
return $content . mantis_after_html();
}
function mantis_after_render()
{
echo mantis_after_html();
}
function mantis_after_init()
{
$location = get_option('mantis_after');
if($location){
register_sidebar(array(
'name' => 'MANTIS After Content',
'id' => 'mantis_after_content',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => ''
));
if($location == 'after_content'){
add_filter('the_content', 'mantis_after_content', 1);
}
}
}
add_action('init', 'mantis_after_init');