/bp-templates/bp-legacy/buddypress/groups/single/home.php

  1. <?php 
  2. /** 
  3. * BuddyPress - Groups Home 
  4. * 
  5. * @package BuddyPress 
  6. * @subpackage bp-legacy 
  7. */ 
  8.  
  9. ?> 
  10. <div id="buddypress"> 
  11.  
  12. <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?> 
  13.  
  14. <?php 
  15.  
  16. /** 
  17. * Fires before the display of the group home content. 
  18. * 
  19. * @since 1.2.0 
  20. */ 
  21. do_action( 'bp_before_group_home_content' ); ?> 
  22.  
  23. <div id="item-header" role="complementary"> 
  24.  
  25. <?php 
  26. /** 
  27. * If the cover image feature is enabled, use a specific header 
  28. */ 
  29. if ( bp_group_use_cover_image_header() ) : 
  30. bp_get_template_part( 'groups/single/cover-image-header' ); 
  31. else : 
  32. bp_get_template_part( 'groups/single/group-header' ); 
  33. endif; 
  34. ?> 
  35.  
  36. </div><!-- #item-header --> 
  37.  
  38. <div id="item-nav"> 
  39. <div class="item-list-tabs no-ajax" id="object-nav" aria-label="<?php esc_attr_e( 'Group primary navigation', 'buddypress' ); ?>" role="navigation"> 
  40. <ul> 
  41.  
  42. <?php bp_get_options_nav(); ?> 
  43.  
  44. <?php 
  45.  
  46. /** 
  47. * Fires after the display of group options navigation. 
  48. * 
  49. * @since 1.2.0 
  50. */ 
  51. do_action( 'bp_group_options_nav' ); ?> 
  52.  
  53. </ul> 
  54. </div> 
  55. </div><!-- #item-nav --> 
  56.  
  57. <div id="item-body"> 
  58.  
  59. <?php 
  60.  
  61. /** 
  62. * Fires before the display of the group home body. 
  63. * 
  64. * @since 1.2.0 
  65. */ 
  66. do_action( 'bp_before_group_body' ); 
  67.  
  68. /** 
  69. * Does this next bit look familiar? If not, go check out WordPress's 
  70. * /wp-includes/template-loader.php file. 
  71. * 
  72. * @todo A real template hierarchy? Gasp! 
  73. */ 
  74.  
  75. // Looking at home location 
  76. if ( bp_is_group_home() ) : 
  77.  
  78. if ( bp_group_is_visible() ) { 
  79.  
  80. // Load appropriate front template 
  81. bp_groups_front_template_part(); 
  82.  
  83. } else { 
  84.  
  85. /** 
  86. * Fires before the display of the group status message. 
  87. * 
  88. * @since 1.1.0 
  89. */ 
  90. do_action( 'bp_before_group_status_message' ); ?> 
  91.  
  92. <div id="message" class="info"> 
  93. <p><?php bp_group_status_message(); ?></p> 
  94. </div> 
  95.  
  96. <?php 
  97.  
  98. /** 
  99. * Fires after the display of the group status message. 
  100. * 
  101. * @since 1.1.0 
  102. */ 
  103. do_action( 'bp_after_group_status_message' ); 
  104.  
  105.  
  106. // Not looking at home 
  107. else : 
  108.  
  109. // Group Admin 
  110. if ( bp_is_group_admin_page() ) : bp_get_template_part( 'groups/single/admin' ); 
  111.  
  112. // Group Activity 
  113. elseif ( bp_is_group_activity() ) : bp_get_template_part( 'groups/single/activity' ); 
  114.  
  115. // Group Members 
  116. elseif ( bp_is_group_members() ) : bp_groups_members_template_part(); 
  117.  
  118. // Group Invitations 
  119. elseif ( bp_is_group_invites() ) : bp_get_template_part( 'groups/single/send-invites' ); 
  120.  
  121. // Old group forums 
  122. elseif ( bp_is_group_forum() ) : bp_get_template_part( 'groups/single/forum' ); 
  123.  
  124. // Membership request 
  125. elseif ( bp_is_group_membership_request() ) : bp_get_template_part( 'groups/single/request-membership' ); 
  126.  
  127. // Anything else (plugins mostly) 
  128. else : bp_get_template_part( 'groups/single/plugins' ); 
  129.  
  130. endif; 
  131.  
  132. endif; 
  133.  
  134. /** 
  135. * Fires after the display of the group home body. 
  136. * 
  137. * @since 1.2.0 
  138. */ 
  139. do_action( 'bp_after_group_body' ); ?> 
  140.  
  141. </div><!-- #item-body --> 
  142.  
  143. <?php 
  144.  
  145. /** 
  146. * Fires after the display of the group home content. 
  147. * 
  148. * @since 1.2.0 
  149. */ 
  150. do_action( 'bp_after_group_home_content' ); ?> 
  151.  
  152. <?php endwhile; endif; ?> 
  153.  
  154. </div><!-- #buddypress --> 
.