[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/groups/single/admin/ -> manage-members.php (source)

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


Generated: Wed Oct 23 01:01:50 2019 Cross-referenced by PHPXref 0.7.1