forked from UCF/TBHC-Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-right.php
84 lines (74 loc) · 3.19 KB
/
sidebar-right.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
<?php disallow_direct_load('sidebar-right.php');?>
<?php if(!function_exists('dynamic_sidebar') or !dynamic_sidebar('Right Sidebar')):?>
<?php endif;?>
<?php
$show_today = get_post_meta($post->ID, 'page_widget_r_showtoday', TRUE);
$today_feed = (get_post_meta($post->ID, 'page_widget_r_today_feed', TRUE) !== '') ? get_post_meta($post->ID, 'page_widget_r_today_feed', TRUE) : '//today.ucf.edu/feed/';
$today_feed_title = get_post_meta($post->ID, 'page_widget_r_today_title', TRUE);
//$show_facebook = get_post_meta($post->ID, 'page_widget_r_showfacebook', TRUE);
$embed1_title = get_post_meta($post->ID, 'page_widget_r_embed1_title', TRUE);
$embed1 = get_post_meta($post->ID, 'page_widget_r_embed1', TRUE);
$embed2_title = get_post_meta($post->ID, 'page_widget_r_embed2_title', TRUE);
$embed2 = get_post_meta($post->ID, 'page_widget_r_embed2', TRUE);
$embed3_title = get_post_meta($post->ID, 'page_widget_r_embed3_title', TRUE);
$embed3 = get_post_meta($post->ID, 'page_widget_r_embed3', TRUE);
// Today Feed
if ($show_today == 'on') {
print '<h3 id="sidebar_r_today" class="sidebar_title">';
$today_feed_title = $today_feed_title !== '' ? 'UCF Today » '.$today_feed_title : 'UCF Today';
print $today_feed_title;
print '</h3>';
print '<div id="sidebar_r_today_wrap" class="sidebar_r_wrap">';
$news = get_sidebar_news($post, 0, 5);
if(count($news)) { ?>
<ul class="news">
<?php
foreach($news as $item) { ?>
<li class="item">
<a href="<?=$item->get_link()?>" class="ignore-external title"><?=$item->get_title()?></a>
</li>
<?php
} ?>
</ul>
<?php
} else {
print '<p>Unable to fetch news.</p>';
}
print '<a class="rssbtn" href="'.$today_feed.'">Full Feed</a>';
print '</div>';
}
/*// Facebook Link
if ($show_facebook == 'on') {
print '<h3 id="sidebar_r_facebook" class="sidebar_title">Connect With UCF</h3>';
print '<div id="sidebar_r_facebook_wrap" class="sidebar_r_wrap">';
print '<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fucf&width=292&height=62&show_faces=false&colorscheme=light&stream=false&border_color&header=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>';
print '</div>';
}*/
// Embed Widget 1
if ($embed1) {
if ($embed1_title !== '') {
print '<h3 id="sidebar_r_embed1" class="sidebar_title">'.$embed1_title.'</h3>';
}
print '<div id="sidebar_r_embed1_wrap" class="sidebar_r_wrap">';
print apply_filters('the_content', $embed1);
print '</div>';
}
// Embed Widget 2
if ($embed2) {
if ($embed2_title !== '') {
print '<h3 id="sidebar_r_embed2" class="sidebar_title">'.$embed2_title.'</h3>';
}
print '<div id="sidebar_r_embed2_wrap" class="sidebar_r_wrap">';
print apply_filters('the_content', $embed2);
print '</div>';
}
// Embed Widget 3
if ($embed3) {
if ($embed3_title !== '') {
print '<h3 id="sidebar_r_embed3" class="sidebar_title">'.$embed3_title.'</h3>';
}
print '<div id="sidebar_r_embed3_wrap" class="sidebar_r_wrap">';
print apply_filters('the_content', $embed3);
print '</div>';
}
?>