shortcodes.php
658 Bytes
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
<?php
add_shortcode( 'firstname', 'firstname' );
function firstname(){
$user = get_userdata( get_current_user_id() );
return "<h1>Hi ".$user->first_name."</h1>";
}
add_shortcode( 'event_list_tz', 'event_list_tz' );
function event_list_tz(){
ob_start(); ?>
<div id="events_list_con">
<table id="events_list">
<tbody>
[events_list ]
<tr>
<td class="date_col">
<div class="date">
<span class="month">#M</span>
<span class="day">#d</span>
</div>
</td>
<td>
#_EVENTLINK <br>
<span class="location">#_LOCATION</span>
</td>
</tr>
[/events_list]
</tbody>
</table>
</div>
<?php
$output = ob_get_clean();
return do_shortcode($output);
}