Advertisement
Guest User

pcwriter

a guest
Aug 2nd, 2010
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. <?php
  2.  
  3. function pages(){
  4. ?>
  5.  
  6. <ul><!-- Community Drop Down -->
  7. <li
  8. <?php if (bp_is_page( BP_ACTIVITY_SLUG ) ||
  9. bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ||
  10. bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ||
  11. bp_is_page( BP_FORUMS_SLUG ) ||
  12. bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  13.  
  14. <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( '', 'buddypress' ) ?>"><?php _e( 'Community', 'buddypress' ) ?></a>
  15. <ul>
  16.  
  17. <?php if ( 'activity' != bp_dtheme_page_on_front() && bp_is_active( 'activity' ) ) : ?>
  18. <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  19. <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
  20. </li>
  21. <?php endif; ?>
  22.  
  23. <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>
  24. <a href="<?php echo site_url() ?>/<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a>
  25. </li>
  26.  
  27. <?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>
  28. <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  29. <a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Member Blogs', 'buddypress' ) ?>"><?php _e( 'Member Blogs', 'buddypress' ) ?></a>
  30. </li>
  31. <?php endif; ?>
  32.  
  33. <?php if ( bp_is_active( 'groups' ) ) : ?>
  34. <li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>
  35. <a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a>
  36. </li>
  37.  
  38. <?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() ) : ?>
  39. <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  40. <a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Group Forums', 'buddypress' ) ?>"><?php _e( 'Group Forums', 'buddypress' ) ?></a>
  41. </li>
  42. <?php endif; ?>
  43. <?php endif; ?>
  44.  
  45. <?php do_action( 'bp_nav_items' ); ?><!-- Add BP- Plugin Directories to Community Drop Down -->
  46. </ul>
  47. </li>
  48.  
  49. <li>
  50. <?php wp_list_pages( 'title_li=&depth=20&exclude=' . bp_dtheme_page_on_front() ); ?>
  51. </li>
  52.  
  53. </ul>
  54.  
  55.  
  56. <?php
  57. }
  58. add_action( 'bp_adminbar_menus', 'pages', 15 );
  59.  
  60.  
  61.  
  62. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement