forked from rotarytheme/rotary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
41 lines (39 loc) · 1.6 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
<?php
/**
* The Sidebar containing the primary and secondary widget areas.
*
* @package WordPress
* @subpackage Rotary
* @since Rotary 1.0
* sidebar used on blog and interior pages
*/
?>
<aside id="secondary" role="complementary">
<ul>
<?php
if(current_user_can('edit_page')){
$currentPostType = get_post_type();
?>
<li class="newpost">
<ul >
<li id="new-post-button">
<?php if ( isset( $_REQUEST['committeeid'])) { ?>
<a class="rotarybutton-largewhite" href="<?php echo admin_url(); ?>post-new.php?committeeid=<?php echo $_REQUEST['committeeid']?>" target="_blank"><?php echo _e( 'Committee Update', 'Rotary'); ?></a>
<?php } elseif ( isset( $_REQUEST['projectid'] )) { ?>
<a class="rotarybutton-largewhite" href="<?php echo admin_url(); ?>post-new.php?projectid=<?php echo $_REQUEST['projectid']?>" target="_blank"><?php echo _e( 'Project Update', 'Rotary'); ?></a>
<?php } else { ?>
<a class="rotarybutton-largewhite" href="<?php echo admin_url(); ?>post-new.php"><?php echo _e( 'New Post', 'Rotary'); ?></a>
<?php } ?>
</li>
</ul>
</li>
<?php }
if(current_user_can('manage_options')){ ?>
<a class="widgetedit" href="<?php echo admin_url(); ?>widgets.php"><?php echo _e( 'Edit Widgets', 'Rotary'); ?></a>
<?php }
if ( is_active_sidebar( 'secondary-widget-area' ) ) :
dynamic_sidebar( 'secondary-widget-area' );
endif;
?>
</ul>
</aside>