Advertisement
rdusnr

Untitled

Jun 16th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  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. */
  10.  
  11. ?>
  12.  
  13. <?php
  14.  
  15. /**
  16. * Fires before the display of groups from the groups loop.
  17. *
  18. * @since 1.2.0
  19. */
  20. do_action( 'bp_before_groups_loop' ); ?>
  21.  
  22. <?php if ( function_exists( 'bp_get_current_group_directory_type' ) && bp_get_current_group_directory_type() ) : ?>
  23. <p class="current-group-type"><?php bp_current_group_directory_type_message() ?></p>
  24. <?php endif; ?>
  25.  
  26. <?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ). '&action=activity_update' . '&per_page='.sq_option('bp_groups_perpage', 24) ) ) : ?>
  27.  
  28. <?php
  29.  
  30. /**
  31. * Fires before the listing of the groups list.
  32. *
  33. * @since 1.1.0
  34. */
  35. do_action( 'bp_before_directory_groups_list' ); ?>
  36.  
  37.  
  38. <ul id="groups-list" class="item-list kleo-isotope masonry" aria-live="assertive" aria-atomic="true" aria-relevant="all">
  39.  
  40. <?php while ( bp_groups() ) : bp_the_group(); ?>
  41.  
  42. <li <?php bp_group_class(); ?> id="<?php echo 'group-id-'.bp_get_group_id(); ?>">
  43. <div class="group-inner-list animated animate-when-almost-visible bottom-to-top">
  44.  
  45. <?php if ( ! bp_disable_group_avatar_uploads() ) : ?>
  46. <div class="item-avatar rounded">
  47. <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=full&width=80&height=80' ); ?></a>
  48. <span class="member-count"><?php echo preg_replace('/\D/', '', bp_get_group_member_count()); ?></span>
  49. </div>
  50. <?php endif; ?>
  51.  
  52. <div class="item">
  53. <div class="item-title"><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a></div>
  54.  
  55. <?php if(function_exists( 'bp_core_iso8601_date' )) : ?>
  56. <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>
  57. <?php else: ?>
  58. <div class="item-meta"><span class="activity"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span></div>
  59. <?php endif; ?>
  60.  
  61. <div class="item-desc"><?php bp_group_description_excerpt(); ?></div>
  62.  
  63. <?php
  64.  
  65. /**
  66. * Fires inside the listing of an individual group listing item.
  67. *
  68. * @since 1.1.0
  69. */
  70. do_action( 'bp_directory_groups_item' ); ?>
  71.  
  72. </div>
  73.  
  74. <div class="action">
  75.  
  76.  
  77.  
  78. <div class="meta">
  79.  
  80. <?php bp_group_type(); ?>
  81.  
  82. </div>
  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>
  94. </div><!--end group-inner-lis-->
  95. </li>
  96.  
  97. <?php endwhile; ?>
  98.  
  99. </ul>
  100.  
  101. <?php
  102.  
  103. /**
  104. * Fires after the listing of the groups list.
  105. *
  106. * @since 1.1.0
  107. */
  108. do_action( 'bp_after_directory_groups_list' ); ?>
  109.  
  110. <div id="pag-bottom" class="pagination">
  111.  
  112. <div class="pag-count" id="group-dir-count-bottom">
  113.  
  114. <?php bp_groups_pagination_count(); ?>
  115.  
  116. </div>
  117.  
  118. <div class="pagination-links" id="group-dir-pag-bottom">
  119.  
  120. <?php bp_groups_pagination_links(); ?>
  121.  
  122. </div>
  123.  
  124. </div>
  125.  
  126. <?php else: ?>
  127.  
  128. <div id="message" class="info">
  129. <p><?php _e( 'There were no groups found.', 'buddypress' ); ?></p>
  130. </div>
  131.  
  132. <?php endif; ?>
  133.  
  134. <?php
  135.  
  136. /**
  137. * Fires after the display of groups from the groups loop.
  138. *
  139. * @since 1.2.0
  140. */
  141. do_action( 'bp_after_groups_loop' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement