Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function pages(){
- global $current_blog;
- ?>
- <?php if($current_blog->blog_id == '1') : ?>
- <ul>
- <!-- Community Drop Down -->
- <li
- <?php if (bp_is_page( BP_ACTIVITY_SLUG ) ||
- bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ||
- bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ||
- bp_is_page( BP_FORUMS_SLUG ) ||
- bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
- <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( '', 'buddypress' ) ?>"><?php _e( 'Community', 'buddypress' ) ?></a>
- <ul>
- <?php if ( bp_is_active( 'activity' ) ) : ?>
- <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
- <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
- </li>
- <?php endif; ?>
- <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>
- <a href="<?php echo site_url() ?>/<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a>
- </li>
- <?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>
- <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
- <a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Member Blogs', 'buddypress' ) ?>"><?php _e( 'Member Blogs', 'buddypress' ) ?></a>
- </li>
- <?php endif; ?>
- <?php if ( bp_is_active( 'groups' ) ) : ?>
- <li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>
- <a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a>
- </li>
- <?php if ( bp_is_active( 'forums' ) && bp_is_active( 'groups' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) get_site_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>
- <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
- <a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Group Forums', 'buddypress' ) ?>"><?php _e( 'Group Forums', 'buddypress' ) ?></a>
- </li>
- <?php endif; ?>
- <?php endif; ?>
- <?php do_action( 'bp_nav_items' ); ?>
- </ul>
- </li>
- <li>
- <?php wp_list_pages( 'title_li=&depth=20&exclude=237,1133,1735,1844' ); ?>
- </li>
- </ul>
- <?php endif; ?>
- <?php
- }
- add_action( 'bp_adminbar_menus', 'pages', 15 )
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement