[ 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">
  68                      <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>">
  69                          <?php
  70                          /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */
  71                          printf( __( 'Active %s', 'buddypress' ), bp_get_group_last_active() );
  72                          ?>
  73                      </span>
  74                  </div>
  75  
  76                  <div class="item-desc"><?php bp_group_description_excerpt(); ?></div>
  77  
  78                  <?php
  79  
  80                  /**
  81                   * Fires inside the listing of an individual group listing item.
  82                   *
  83                   * @since 1.1.0
  84                   */
  85                  do_action( 'bp_directory_groups_item' ); ?>
  86  
  87              </div>
  88  
  89              <div class="action">
  90  
  91                  <?php
  92  
  93                  /**
  94                   * Fires inside the action section of an individual group listing item.
  95                   *
  96                   * @since 1.1.0
  97                   */
  98                  do_action( 'bp_directory_groups_actions' ); ?>
  99  
 100                  <div class="meta">
 101  
 102                      <?php bp_group_type(); ?> / <?php bp_group_member_count(); ?>
 103  
 104                  </div>
 105  
 106              </div>
 107  
 108              <div class="clear"></div>
 109          </li>
 110  
 111      <?php endwhile; ?>
 112  
 113      </ul>
 114  
 115      <?php
 116  
 117      /**
 118       * Fires after the listing of the groups list.
 119       *
 120       * @since 1.1.0
 121       */
 122      do_action( 'bp_after_directory_groups_list' ); ?>
 123  
 124      <div id="pag-bottom" class="pagination">
 125  
 126          <div class="pag-count" id="group-dir-count-bottom">
 127  
 128              <?php bp_groups_pagination_count(); ?>
 129  
 130          </div>
 131  
 132          <div class="pagination-links" id="group-dir-pag-bottom">
 133  
 134              <?php bp_groups_pagination_links(); ?>
 135  
 136          </div>
 137  
 138      </div>
 139  
 140  <?php else: ?>
 141  
 142      <div id="message" class="info">
 143          <p><?php _e( 'There were no groups found.', 'buddypress' ); ?></p>
 144      </div>
 145  
 146  <?php endif; ?>
 147  
 148  <?php
 149  
 150  /**
 151   * Fires after the display of groups from the groups loop.
 152   *
 153   * @since 1.2.0
 154   */
 155  do_action( 'bp_after_groups_loop' );


Generated: Tue Apr 23 01:01:07 2024 Cross-referenced by PHPXref 0.7.1