[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/groups/ -> groups-loop.php (source)

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


Generated: Mon Oct 21 01:01:35 2019 Cross-referenced by PHPXref 0.7.1