This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

pcwriter

By: a guest on Aug 8th, 2010  |  syntax: None  |  size: 2.50 KB  |  views: 40  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. global $current_blog;
  3. function pages(){
  4.  
  5. ?>
  6.  
  7. <?php if($current_blog == '1') : ?>
  8.  
  9. <ul>
  10.  
  11. <!-- Community Drop Down -->
  12. <li
  13. <?php if (bp_is_page( BP_ACTIVITY_SLUG ) ||
  14. bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ||
  15. bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ||
  16. bp_is_page( BP_FORUMS_SLUG ) ||
  17. bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  18.  
  19. <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( '', 'buddypress' ) ?>"><?php _e( 'Community', 'buddypress' ) ?></a>
  20.  
  21. <ul>
  22.  
  23. <?php if ( bp_is_active( 'activity' ) ) : ?>
  24. <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  25. <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
  26. </li>
  27. <?php endif; ?>
  28.  
  29. <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>>
  30. <a href="<?php echo site_url() ?>/<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a>
  31. </li>
  32.  
  33. <?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>
  34. <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  35. <a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Member Blogs', 'buddypress' ) ?>"><?php _e( 'Member Blogs', 'buddypress' ) ?></a>
  36. </li>
  37. <?php endif; ?>
  38.  
  39. <?php if ( bp_is_active( 'groups' ) ) : ?>
  40. <li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>
  41. <a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a>
  42. </li>
  43.  
  44. <?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() ) : ?>
  45. <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
  46. <a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Group Forums', 'buddypress' ) ?>"><?php _e( 'Group Forums', 'buddypress' ) ?></a>
  47. </li>
  48. <?php endif; ?>
  49. <?php endif; ?>
  50.  
  51. <?php do_action( 'bp_nav_items' ); ?>
  52.  
  53. </ul>
  54.  
  55. </li>
  56.  
  57. <li>
  58.  
  59. <?php wp_list_pages( 'title_li=&depth=20&exclude=237,1133,1735,1844' ); ?>
  60.  
  61. </li>
  62.  
  63. </ul>
  64.  
  65. <?php endif; ?>
  66.  
  67. <?php
  68.  
  69. }
  70.  
  71. add_action( 'bp_adminbar_menus', 'pages', 15 )
  72.  
  73. ?>
clone this paste RAW Paste Data