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

  1. <?php 
  2. /** 
  3. * BuddyPress - Groups 
  4. * 
  5. * @package BuddyPress 
  6. * @subpackage bp-legacy 
  7. */ 
  8.  
  9. /** 
  10. * Fires at the top of the groups directory template file. 
  11. * 
  12. * @since 1.5.0 
  13. */ 
  14. do_action( 'bp_before_directory_groups_page' ); ?> 
  15.  
  16. <div id="buddypress"> 
  17.  
  18. <?php 
  19.  
  20. /** 
  21. * Fires before the display of the groups. 
  22. * 
  23. * @since 1.1.0 
  24. */ 
  25. do_action( 'bp_before_directory_groups' ); ?> 
  26.  
  27. <?php 
  28.  
  29. /** 
  30. * Fires before the display of the groups content. 
  31. * 
  32. * @since 1.1.0 
  33. */ 
  34. do_action( 'bp_before_directory_groups_content' ); ?> 
  35.  
  36. <?php /** Backward compatibility for inline search form. Use template part instead. */ ?> 
  37. <?php if ( has_filter( 'bp_directory_groups_search_form' ) ) : ?> 
  38.  
  39. <div id="group-dir-search" class="dir-search" role="search"> 
  40. <?php bp_directory_groups_search_form(); ?> 
  41. </div><!-- #group-dir-search --> 
  42.  
  43. <?php else: ?> 
  44.  
  45. <?php bp_get_template_part( 'common/search/dir-search-form' ); ?> 
  46.  
  47. <?php endif; ?> 
  48.  
  49. <form action="" method="post" id="groups-directory-form" class="dir-form"> 
  50.  
  51. <div id="template-notices" role="alert" aria-atomic="true"> 
  52. <?php 
  53.  
  54. /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */ 
  55. do_action( 'template_notices' ); ?> 
  56.  
  57. </div> 
  58.  
  59. <div class="item-list-tabs" aria-label="<?php esc_attr_e( 'Groups directory main navigation', 'buddypress' ); ?>"> 
  60. <ul> 
  61. <li class="selected" id="groups-all"><a href="<?php bp_groups_directory_permalink(); ?>"><?php printf( __( 'All Groups %s', 'buddypress' ), '<span>' . bp_get_total_group_count() . '</span>' ); ?></a></li> 
  62.  
  63. <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?> 
  64. <li id="groups-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups/'; ?>"><?php printf( __( 'My Groups %s', 'buddypress' ), '<span>' . bp_get_total_group_count_for_user( bp_loggedin_user_id() ) . '</span>' ); ?></a></li> 
  65. <?php endif; ?> 
  66.  
  67. <?php 
  68.  
  69. /** 
  70. * Fires inside the groups directory group filter input. 
  71. * 
  72. * @since 1.5.0 
  73. */ 
  74. do_action( 'bp_groups_directory_group_filter' ); ?> 
  75.  
  76. </ul> 
  77. </div><!-- .item-list-tabs --> 
  78.  
  79. <div class="item-list-tabs" id="subnav" aria-label="<?php esc_attr_e( 'Groups directory secondary navigation', 'buddypress' ); ?>" role="navigation"> 
  80. <ul> 
  81. <?php 
  82.  
  83. /** 
  84. * Fires inside the groups directory group types. 
  85. * 
  86. * @since 1.2.0 
  87. */ 
  88. do_action( 'bp_groups_directory_group_types' ); ?> 
  89.  
  90. <li id="groups-order-select" class="last filter"> 
  91.  
  92. <label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label> 
  93.  
  94. <select id="groups-order-by"> 
  95. <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option> 
  96. <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option> 
  97. <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option> 
  98. <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option> 
  99.  
  100. <?php 
  101.  
  102. /** 
  103. * Fires inside the groups directory group order options. 
  104. * 
  105. * @since 1.2.0 
  106. */ 
  107. do_action( 'bp_groups_directory_order_options' ); ?> 
  108. </select> 
  109. </li> 
  110. </ul> 
  111. </div> 
  112.  
  113. <h2 class="bp-screen-reader-text"><?php 
  114. /** translators: accessibility text */ 
  115. _e( 'Groups directory', 'buddypress' ); 
  116. ?></h2> 
  117.  
  118. <div id="groups-dir-list" class="groups dir-list"> 
  119. <?php bp_get_template_part( 'groups/groups-loop' ); ?> 
  120. </div><!-- #groups-dir-list --> 
  121.  
  122. <?php 
  123.  
  124. /** 
  125. * Fires and displays the group content. 
  126. * 
  127. * @since 1.1.0 
  128. */ 
  129. do_action( 'bp_directory_groups_content' ); ?> 
  130.  
  131. <?php wp_nonce_field( 'directory_groups', '_wpnonce-groups-filter' ); ?> 
  132.  
  133. <?php 
  134.  
  135. /** 
  136. * Fires after the display of the groups content. 
  137. * 
  138. * @since 1.1.0 
  139. */ 
  140. do_action( 'bp_after_directory_groups_content' ); ?> 
  141.  
  142. </form><!-- #groups-directory-form --> 
  143.  
  144. <?php 
  145.  
  146. /** 
  147. * Fires after the display of the groups. 
  148. * 
  149. * @since 1.1.0 
  150. */ 
  151. do_action( 'bp_after_directory_groups' ); ?> 
  152.  
  153. </div><!-- #buddypress --> 
  154.  
  155. <?php 
  156.  
  157. /** 
  158. * Fires at the bottom of the groups directory template file. 
  159. * 
  160. * @since 1.5.0 
  161. */ 
  162. do_action( 'bp_after_directory_groups_page' ); 
.