/bp-templates/bp-legacy/buddypress/groups/single/admin/manage-members.php

  1. <?php 
  2. /** 
  3. * BuddyPress - Groups Admin - Manage Members 
  4. * 
  5. * @package BuddyPress 
  6. * @subpackage bp-legacy 
  7. */ 
  8.  
  9. ?> 
  10.  
  11. <h2 class="bp-screen-reader-text"><?php _e( 'Manage Members', 'buddypress' ); ?></h2> 
  12.  
  13. <?php 
  14.  
  15. /** 
  16. * Fires before the group manage members admin display. 
  17. * 
  18. * @since 1.1.0 
  19. */ 
  20. do_action( 'bp_before_group_manage_members_admin' ); ?> 
  21.  
  22. <div aria-live="polite" aria-relevant="all" aria-atomic="true"> 
  23.  
  24. <div class="bp-widget group-members-list group-admins-list"> 
  25. <h3 class="section-header"><?php _e( 'Administrators', 'buddypress' ); ?></h3> 
  26.  
  27. <?php if ( bp_group_has_members( array( 'per_page' => 15, 'group_role' => array( 'admin' ), 'page_arg' => 'mlpage-admin' ) ) ) : ?> 
  28.  
  29. <?php if ( bp_group_member_needs_pagination() ) : ?> 
  30.  
  31. <div class="pagination no-ajax"> 
  32.  
  33. <div id="member-count" class="pag-count"> 
  34. <?php bp_group_member_pagination_count(); ?> 
  35. </div> 
  36.  
  37. <div id="member-admin-pagination" class="pagination-links"> 
  38. <?php bp_group_member_admin_pagination(); ?> 
  39. </div> 
  40.  
  41. </div> 
  42.  
  43. <?php endif; ?> 
  44.  
  45. <ul id="admins-list" class="item-list"> 
  46. <?php while ( bp_group_members() ) : bp_group_the_member(); ?> 
  47. <li> 
  48. <div class="item-avatar"> 
  49. <?php bp_group_member_avatar_thumb(); ?> 
  50. </div> 
  51.  
  52. <div class="item"> 
  53. <div class="item-title"> 
  54. <?php bp_group_member_link(); ?> 
  55. </div> 
  56. <p class="joined item-meta"> 
  57. <?php bp_group_member_joined_since(); ?> 
  58. </p> 
  59. <?php 
  60.  
  61. /** 
  62. * Fires inside the item section of a member admin item in group management area. 
  63. * 
  64. * @since 1.1.0 
  65. * @since 2.7.0 Added $section parameter. 
  66. * 
  67. * @param $section Which list contains this item. 
  68. */ 
  69. do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?> 
  70. </div> 
  71.  
  72. <div class="action"> 
  73. <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?> 
  74. <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link(); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a> 
  75. <?php endif; ?> 
  76.  
  77. <?php 
  78.  
  79. /** 
  80. * Fires inside the action section of a member admin item in group management area. 
  81. * 
  82. * @since 2.7.0 
  83. * 
  84. * @param $section Which list contains this item. 
  85. */ 
  86. do_action( 'bp_group_manage_members_admin_actions', 'admins-list' ); ?> 
  87. </div> 
  88. </li> 
  89. <?php endwhile; ?> 
  90. </ul> 
  91.  
  92. <?php if ( bp_group_member_needs_pagination() ) : ?> 
  93.  
  94. <div class="pagination no-ajax"> 
  95.  
  96. <div id="member-count" class="pag-count"> 
  97. <?php bp_group_member_pagination_count(); ?> 
  98. </div> 
  99.  
  100. <div id="member-admin-pagination" class="pagination-links"> 
  101. <?php bp_group_member_admin_pagination(); ?> 
  102. </div> 
  103.  
  104. </div> 
  105.  
  106. <?php endif; ?> 
  107.  
  108. <?php else: ?> 
  109.  
  110. <div id="message" class="info"> 
  111. <p><?php _e( 'No group administrators were found.', 'buddypress' ); ?></p> 
  112. </div> 
  113.  
  114. <?php endif; ?> 
  115. </div> 
  116.  
  117. <div class="bp-widget group-members-list group-mods-list"> 
  118. <h3 class="section-header"><?php _e( 'Moderators', 'buddypress' ); ?></h3> 
  119.  
  120. <?php if ( bp_group_has_members( array( 'per_page' => 15, 'group_role' => array( 'mod' ), 'page_arg' => 'mlpage-mod' ) ) ) : ?> 
  121.  
  122. <?php if ( bp_group_member_needs_pagination() ) : ?> 
  123.  
  124. <div class="pagination no-ajax"> 
  125.  
  126. <div id="member-count" class="pag-count"> 
  127. <?php bp_group_member_pagination_count(); ?> 
  128. </div> 
  129.  
  130. <div id="member-admin-pagination" class="pagination-links"> 
  131. <?php bp_group_member_admin_pagination(); ?> 
  132. </div> 
  133.  
  134. </div> 
  135.  
  136. <?php endif; ?> 
  137.  
  138. <ul id="mods-list" class="item-list"> 
  139.  
  140. <?php while ( bp_group_members() ) : bp_group_the_member(); ?> 
  141. <li> 
  142. <div class="item-avatar"> 
  143. <?php bp_group_member_avatar_thumb(); ?> 
  144. </div> 
  145.  
  146. <div class="item"> 
  147. <div class="item-title"> 
  148. <?php bp_group_member_link(); ?> 
  149. </div> 
  150. <p class="joined item-meta"> 
  151. <?php bp_group_member_joined_since(); ?> 
  152. </p> 
  153. <?php 
  154.  
  155. /** 
  156. * Fires inside the item section of a member admin item in group management area. 
  157. * 
  158. * @since 1.1.0 
  159. * @since 2.7.0 Added $section parameter. 
  160. * 
  161. * @param $section Which list contains this item. 
  162. */ 
  163. do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?> 
  164. </div> 
  165.  
  166. <div class="action"> 
  167. <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a> 
  168. <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link(); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a> 
  169.  
  170. <?php 
  171.  
  172. /** 
  173. * Fires inside the action section of a member admin item in group management area. 
  174. * 
  175. * @since 2.7.0 
  176. * 
  177. * @param $section Which list contains this item. 
  178. */ 
  179. do_action( 'bp_group_manage_members_admin_actions', 'mods-list' ); ?> 
  180.  
  181. </div> 
  182. </li> 
  183. <?php endwhile; ?> 
  184.  
  185. </ul> 
  186.  
  187. <?php if ( bp_group_member_needs_pagination() ) : ?> 
  188.  
  189. <div class="pagination no-ajax"> 
  190.  
  191. <div id="member-count" class="pag-count"> 
  192. <?php bp_group_member_pagination_count(); ?> 
  193. </div> 
  194.  
  195. <div id="member-admin-pagination" class="pagination-links"> 
  196. <?php bp_group_member_admin_pagination(); ?> 
  197. </div> 
  198.  
  199. </div> 
  200.  
  201. <?php endif; ?> 
  202.  
  203. <?php else: ?> 
  204.  
  205. <div id="message" class="info"> 
  206. <p><?php _e( 'No group moderators were found.', 'buddypress' ); ?></p> 
  207. </div> 
  208.  
  209. <?php endif; ?> 
  210. </div> 
  211.  
  212. <div class="bp-widget group-members-list"> 
  213. <h3 class="section-header"><?php _e( "Members", 'buddypress' ); ?></h3> 
  214.  
  215. <?php if ( bp_group_has_members( array( 'per_page' => 15, 'exclude_banned' => 0 ) ) ) : ?> 
  216.  
  217. <?php if ( bp_group_member_needs_pagination() ) : ?> 
  218.  
  219. <div class="pagination no-ajax"> 
  220.  
  221. <div id="member-count" class="pag-count"> 
  222. <?php bp_group_member_pagination_count(); ?> 
  223. </div> 
  224.  
  225. <div id="member-admin-pagination" class="pagination-links"> 
  226. <?php bp_group_member_admin_pagination(); ?> 
  227. </div> 
  228.  
  229. </div> 
  230.  
  231. <?php endif; ?> 
  232.  
  233. <ul id="members-list" class="item-list" aria-live="assertive" aria-relevant="all"> 
  234. <?php while ( bp_group_members() ) : bp_group_the_member(); ?> 
  235.  
  236. <li class="<?php bp_group_member_css_class(); ?>"> 
  237. <div class="item-avatar"> 
  238. <?php bp_group_member_avatar_thumb(); ?> 
  239. </div> 
  240.  
  241. <div class="item"> 
  242. <div class="item-title"> 
  243. <?php bp_group_member_link(); ?> 
  244. <?php 
  245. if ( bp_get_group_member_is_banned() ) { 
  246. echo ' <span class="banned">'; 
  247. _e( '(banned)', 'buddypress' ); 
  248. echo '</span>'; 
  249. } ?> 
  250. </div> 
  251. <p class="joined item-meta"> 
  252. <?php bp_group_member_joined_since(); ?> 
  253. </p> 
  254. <?php 
  255.  
  256. /** 
  257. * Fires inside the item section of a member admin item in group management area. 
  258. * 
  259. * @since 1.1.0 
  260. * @since 2.7.0 Added $section parameter. 
  261. * 
  262. * @param $section Which list contains this item. 
  263. */ 
  264. do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?> 
  265. </div> 
  266.  
  267. <div class="action"> 
  268. <?php if ( bp_get_group_member_is_banned() ) : ?> 
  269.  
  270. <a href="<?php bp_group_member_unban_link(); ?>" class="button confirm member-unban" title="<?php esc_attr_e( 'Unban this member', 'buddypress' ); ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a> 
  271.  
  272. <?php else : ?> 
  273.  
  274. <a href="<?php bp_group_member_ban_link(); ?>" class="button confirm member-ban"><?php _e( 'Kick & Ban', 'buddypress' ); ?></a> 
  275. <a href="<?php bp_group_member_promote_mod_link(); ?>" class="button confirm member-promote-to-mod"><?php _e( 'Promote to Mod', 'buddypress' ); ?></a> 
  276. <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm member-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a> 
  277.  
  278. <?php endif; ?> 
  279.  
  280. <a href="<?php bp_group_member_remove_link(); ?>" class="button confirm"><?php _e( 'Remove from group', 'buddypress' ); ?></a> 
  281.  
  282. <?php 
  283.  
  284. /** 
  285. * Fires inside the action section of a member admin item in group management area. 
  286. * 
  287. * @since 2.7.0 
  288. * 
  289. * @param $section Which list contains this item. 
  290. */ 
  291. do_action( 'bp_group_manage_members_admin_actions', 'members-list' ); ?> 
  292. </div> 
  293. </li> 
  294.  
  295. <?php endwhile; ?> 
  296. </ul> 
  297.  
  298. <?php if ( bp_group_member_needs_pagination() ) : ?> 
  299.  
  300. <div class="pagination no-ajax"> 
  301.  
  302. <div id="member-count" class="pag-count"> 
  303. <?php bp_group_member_pagination_count(); ?> 
  304. </div> 
  305.  
  306. <div id="member-admin-pagination" class="pagination-links"> 
  307. <?php bp_group_member_admin_pagination(); ?> 
  308. </div> 
  309.  
  310. </div> 
  311.  
  312. <?php endif; ?> 
  313.  
  314. <?php else: ?> 
  315.  
  316. <div id="message" class="info"> 
  317. <p><?php _e( 'No group members were found.', 'buddypress' ); ?></p> 
  318. </div> 
  319.  
  320. <?php endif; ?> 
  321. </div> 
  322.  
  323. </div> 
  324.  
  325. <?php 
  326.  
  327. /** 
  328. * Fires after the group manage members admin display. 
  329. * 
  330. * @since 1.1.0 
  331. */ 
  332. do_action( 'bp_after_group_manage_members_admin' ); ?> 
.