Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

r-a-y

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