bp_groupblog_options_nav

The BP Groupblog bp groupblog options nav function.

Description

bp_groupblog_options_nav(); 

Usage

  1. if ( !function_exists( 'bp_groupblog_options_nav' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/themes/bp-groupblog/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_groupblog_options_nav(); 
  7.  

Defined (2)

The function is defined in the following location(s).

/themes/bp-groupblog/functions.php  
  1. function bp_groupblog_options_nav() { 
  2. global $bp; 
  3. ?> 
  4.  
  5. <li id="home-personal-li"> 
  6. <a id="home" href="<?php bp_group_permalink() ?>"><?php _e( 'Home', 'buddypress' ); ?></a> 
  7. </li> 
  8.  
  9. <?php if ( groups_is_user_admin( $bp->loggedin_user->id, bp_get_group_id() ) || groups_is_user_mod( $bp->loggedin_user->id, bp_get_group_id() ) ) : ?>  
  10. <li id="admin-personal-li" > 
  11. <a id="admin" href="<?php bp_group_permalink() ?>admin/"><?php _e( 'Admin', 'buddypress' ); ?></a> 
  12. </li> 
  13. <?php endif; ?> 
  14.  
  15. <?php if ( bp_group_is_visible() ) : ?>  
  16.  
  17. <?php if ( bp_groupblog_is_blog_enabled ( bp_get_group_id() ) ) : ?> 
  18. <li id="<?php echo BP_GROUPBLOG_SLUG; ?>-personal-li" class="current selected"> 
  19. <a id="<?php echo BP_GROUPBLOG_SLUG; ?>" href="<?php bp_group_permalink() ?>blog/"><?php _e( 'Blog', 'buddypress' ); ?></a> 
  20. </li> 
  21. <?php endif; ?> 
  22.  
  23. <?php if ( bp_is_active( 'forums' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && bp_group_is_forum_enabled() && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?> 
  24. <li id="<?php echo BP_FORUMS_SLUG; ?>-personal-li" > 
  25. <a id="<?php echo BP_FORUMS_SLUG; ?>" href="<?php bp_group_permalink() ?>forum/"><?php _e( 'Forum', 'buddypress' ); ?></a> 
  26. </li> 
  27. <?php endif; ?> 
  28.  
  29. <li id="<?php echo BP_MEMBERS_SLUG; ?>-personal-li" > 
  30. <a id="<?php echo BP_MEMBERS_SLUG; ?>" href="<?php bp_group_permalink() ?>members/"><?php _e( 'Members', 'buddypress' ); ?> (<?php bp_group_total_members() ?>)</a> 
  31. </li> 
  32.  
  33. <li id="invite-personal-li" > 
  34. <a id="invite" href="<?php bp_group_permalink() ?>send-invites/"><?php _e( 'Send Invites', 'buddypress' ); ?></a> 
  35. </li> 
  36.  
  37. <?php elseif ( !bp_group_is_visible() && bp_get_group_status() != 'hidden' ) : ?> 
  38.  
  39. <li id="request-membership-personal-li" > 
  40. <a id="request-membership" href="<?php bp_group_permalink() ?>request-membership/"><?php _e( 'Request Membership', 'buddypress' ); ?></a> 
  41. </li> 
  42.  
  43. <?php endif; ?> 
  44.  
  45. <?php 
/themes/p2-buddypress/functions.php  
  1. function bp_groupblog_options_nav() { 
  2. global $bp; 
  3. $checks = get_site_option('bp_groupblog_blog_defaults_options'); 
  4. ?> 
  5.  
  6. <li id="home-personal-li"<?php if ( $checks['deep_group_integration'] ) : ?> class="current selected"<?php endif; ?>> 
  7. <a id="home" href="<?php bp_group_permalink() ?>"><?php _e( 'Home', 'groupblog' ); ?></a> 
  8. </li> 
  9.  
  10. <?php if ( groups_is_user_admin( $bp->loggedin_user->id, bp_get_group_id() ) || groups_is_user_mod( $bp->loggedin_user->id, bp_get_group_id() ) ) : ?> 
  11. <li id="admin-personal-li" > 
  12. <a id="admin" href="<?php bp_group_permalink() ?>admin/"><?php _e( 'Admin', 'groupblog' ); ?></a> 
  13. </li> 
  14. <?php endif; ?> 
  15.  
  16. <?php if ( bp_group_is_visible() ) : ?> 
  17.  
  18. <?php if ( bp_groupblog_is_blog_enabled ( bp_get_group_id() ) ) : ?> 
  19. <?php if ( !$checks['deep_group_integration'] ) : ?> 
  20. <li id="<?php echo BP_GROUPBLOG_SLUG; ?>-personal-li"<?php //if ( is_page() ) : ?> class="current selected"<?php //endif; ?>> 
  21. <a id="<?php echo BP_GROUPBLOG_SLUG; ?>" href="<?php bp_group_permalink() ?>blog/"><?php _e( 'Blog', 'groupblog' ); ?></a> 
  22. </li> 
  23. <?php endif; ?> 
  24. <?php endif; ?> 
  25.  
  26. <?php if ( bp_is_active( 'forums' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && bp_group_is_forum_enabled() && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?> 
  27. <li id="<?php echo BP_FORUMS_SLUG; ?>-personal-li" > 
  28. <a id="<?php echo BP_FORUMS_SLUG; ?>" href="<?php bp_group_permalink() ?>forum/"><?php _e( 'Forum', 'groupblog' ); ?></a> 
  29. </li> 
  30. <?php endif; ?> 
  31.  
  32. <li id="<?php echo BP_MEMBERS_SLUG; ?>-personal-li" > 
  33. <a id="<?php echo BP_MEMBERS_SLUG; ?>" href="<?php bp_group_permalink() ?>members/"><?php _e( 'Members', 'groupblog' ); ?> (<?php bp_group_total_members() ?>)</a> 
  34. </li> 
  35.  
  36. <li id="invite-personal-li" > 
  37. <a id="invite" href="<?php bp_group_permalink() ?>send-invites/"><?php _e( 'Send Invites', 'groupblog' ); ?></a> 
  38. </li> 
  39.  
  40. <?php elseif ( !bp_group_is_visible() && bp_get_group_status() != 'hidden' ) : ?> 
  41.  
  42. <li id="request-membership-personal-li" > 
  43. <a id="request-membership" href="<?php bp_group_permalink() ?>request-membership/"><?php _e( 'Request Membership', 'groupblog' ); ?></a> 
  44. </li> 
  45.  
  46. <?php endif; ?> 
  47.  
  48. <?php