forked from AndorChen/V2Press
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.php
41 lines (39 loc) · 1.9 KB
/
sidebar.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
<aside id="sidebar">
<div id="user-panel" class="box">
<?php if ( is_user_logged_in() ) : ?>
<div class="inner">
<?php vp_user_avatar_link(); ?>
<strong><?php vp_user_profile_link(); ?></strong>
<div id="favorites">
<ul>
<li><a rel="nofollow" href="<?php echo vp_get_page_url_by_slug( 'bookmarks' ); ?>"><?php printf( _n( '<span>%d</span> Bookmark', '<span>%d</span> Bookmarks', vp_get_bookmarks_count(), 'v2press'), vp_get_bookmarks_count() ); ?></a></li>
<li class="last"><a rel="nofollow" href="<?php echo vp_get_page_url_by_slug( 'following' ); ?>"><?php printf( __( '<span>%d</span> Following', 'v2press' ), vp_get_following_count() ); ?></a></li>
</ul>
</div>
</div>
<div class="footing">
<p class="xsmall fade"><a href="<?php echo vp_get_page_url_by_slug( 'notifications' ); ?>"><?php vp_unread_notifications(); ?></a></p>
</div>
<?php else : ?>
<div class="heading">
<p><strong><?php bloginfo( 'name' ); ?></strong></p>
<?php if ( get_bloginfo( 'description' ) ) : ?>
<p class="xsmall fade"><?php bloginfo( 'description' ); ?></p>
<?php endif; ?>
</div>
<div class="inner">
<p class="center"><?php vp_page_link( array( 'slug' => 'signup', 'text' => __( 'Signup', 'v2press'), 'class' => 'btn' ) ); ?></p>
<p class="fade center"><?php printf( __( 'Already signup? %s', 'v2press' ), vp_page_link( array ( 'slug' =>'signin', 'text' => __( 'Signin', 'v2press' ), 'display' => false ) ) ); ?></p>
</div>
<?php endif; // END if is_user_logged_in() ?>
</div>
<?php
if ( is_home() ) {
get_template_part( 'sidebar', 'home' );
} elseif ( ( is_single() && !vp_is_edit() ) || is_category() ) {
get_template_part( 'sidebar', 'category' );
} elseif ( is_page( 'new' ) || vp_is_edit() ) {
get_template_part( 'sidebar', 'new' );
}
?>
</aside><!--END #sidebar-->