/bp-templates/bp-legacy/buddypress/groups/groups-loop.php

  1. <?php 
  2. /** 
  3. * BuddyPress - Groups Loop 
  4. * 
  5. * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter(). 
  6. * 
  7. * @package BuddyPress 
  8. * @subpackage bp-legacy 
  9. */ 
  10.  
  11. ?> 
  12.  
  13. <?php 
  14.  
  15. /** 
  16. * Fires before the display of groups from the groups loop. 
  17. * 
  18. * @since 1.2.0 
  19. */ 
  20. do_action( 'bp_before_groups_loop' ); ?> 
  21.  
  22. <?php if ( bp_get_current_group_directory_type() ) : ?> 
  23. <p class="current-group-type"><?php bp_current_group_directory_type_message() ?></p> 
  24. <?php endif; ?> 
  25.  
  26. <?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) ) ) : ?> 
  27.  
  28. <div id="pag-top" class="pagination"> 
  29.  
  30. <div class="pag-count" id="group-dir-count-top"> 
  31.  
  32. <?php bp_groups_pagination_count(); ?> 
  33.  
  34. </div> 
  35.  
  36. <div class="pagination-links" id="group-dir-pag-top"> 
  37.  
  38. <?php bp_groups_pagination_links(); ?> 
  39.  
  40. </div> 
  41.  
  42. </div> 
  43.  
  44. <?php 
  45.  
  46. /** 
  47. * Fires before the listing of the groups list. 
  48. * 
  49. * @since 1.1.0 
  50. */ 
  51. do_action( 'bp_before_directory_groups_list' ); ?> 
  52.  
  53. <ul id="groups-list" class="item-list" aria-live="assertive" aria-atomic="true" aria-relevant="all"> 
  54.  
  55. <?php while ( bp_groups() ) : bp_the_group(); ?> 
  56.  
  57. <li <?php bp_group_class(); ?>> 
  58. <?php if ( ! bp_disable_group_avatar_uploads() ) : ?> 
  59. <div class="item-avatar"> 
  60. <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=thumb&width=50&height=50' ); ?></a> 
  61. </div> 
  62. <?php endif; ?> 
  63.  
  64. <div class="item"> 
  65. <div class="item-title"><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a></div> 
  66. <div class="item-meta"><span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span></div> 
  67.  
  68. <div class="item-desc"><?php bp_group_description_excerpt(); ?></div> 
  69.  
  70. <?php 
  71.  
  72. /** 
  73. * Fires inside the listing of an individual group listing item. 
  74. * 
  75. * @since 1.1.0 
  76. */ 
  77. do_action( 'bp_directory_groups_item' ); ?> 
  78.  
  79. </div> 
  80.  
  81. <div class="action"> 
  82.  
  83. <?php 
  84.  
  85. /** 
  86. * Fires inside the action section of an individual group listing item. 
  87. * 
  88. * @since 1.1.0 
  89. */ 
  90. do_action( 'bp_directory_groups_actions' ); ?> 
  91.  
  92. <div class="meta"> 
  93.  
  94. <?php bp_group_type(); ?> / <?php bp_group_member_count(); ?> 
  95.  
  96. </div> 
  97.  
  98. </div> 
  99.  
  100. <div class="clear"></div> 
  101. </li> 
  102.  
  103. <?php endwhile; ?> 
  104.  
  105. </ul> 
  106.  
  107. <?php 
  108.  
  109. /** 
  110. * Fires after the listing of the groups list. 
  111. * 
  112. * @since 1.1.0 
  113. */ 
  114. do_action( 'bp_after_directory_groups_list' ); ?> 
  115.  
  116. <div id="pag-bottom" class="pagination"> 
  117.  
  118. <div class="pag-count" id="group-dir-count-bottom"> 
  119.  
  120. <?php bp_groups_pagination_count(); ?> 
  121.  
  122. </div> 
  123.  
  124. <div class="pagination-links" id="group-dir-pag-bottom"> 
  125.  
  126. <?php bp_groups_pagination_links(); ?> 
  127.  
  128. </div> 
  129.  
  130. </div> 
  131.  
  132. <?php else: ?> 
  133.  
  134. <div id="message" class="info"> 
  135. <p><?php _e( 'There were no groups found.', 'buddypress' ); ?></p> 
  136. </div> 
  137.  
  138. <?php endif; ?> 
  139.  
  140. <?php 
  141.  
  142. /** 
  143. * Fires after the display of groups from the groups loop. 
  144. * 
  145. * @since 1.2.0 
  146. */ 
  147. do_action( 'bp_after_groups_loop' ); ?> 
.