forked from zgreen/MITlibraries-child
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
39 lines (29 loc) · 777 Bytes
/
Copy pathsidebar.php
File metadata and controls
39 lines (29 loc) · 777 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
<?php
/**
* The Sidebar containing the primary and secondary widget areas.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>
<?php if (is_active_sidebar('sidebar-1')): ?>
<div id="secondary" class="widget-area sidebar" role="complementary">
<?php
dynamic_sidebar( 'sidebar-1' );
// Show Login/Logout for News blog
$blogName = get_bloginfo('name');
if($blogName == 'MIT Libraries News'):
?>
<aside class="widget admin">
<h2>Admin</h2>
<?php if (is_user_logged_in(1)) {
echo '<span><a href="'.wp_logout_url().'">Log out</a></span>';
} else {
echo '<span><a href="'.wp_login_url().'">Log in</a></span>';
}
?>
</aside>
<?php endif; ?>
</div><!-- #secondary -->
<?php endif; ?>