Advertisement
Guest User

Untitled

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