rdusnr

Untitled

Jul 18th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * BuddyPress - Members Loop
  5. *
  6. * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter()
  7. *
  8. * @package BuddyPress
  9. * @subpackage bp-legacy
  10. */
  11.  
  12. /**
  13. * Fires before the display of the members loop.
  14. *
  15. * @since 1.2.0
  16. */
  17. do_action( 'bp_before_members_loop' ); ?>
  18.  
  19. <?php if ( bp_get_current_member_type() ) : ?>
  20. <p class="current-member-type"><?php bp_current_member_type_message() ?></p>
  21. <?php endif; ?>
  22.  
  23. <?php if ( bp_has_members( bp_ajax_querystring( 'members' ). '&per_page='.sq_option('bp_members_perpage', 24) ) ) : ?>
  24.  
  25. <div id="pag-top" class="pagination">
  26.  
  27. <div class="pag-count" id="member-dir-count-top">
  28.  
  29. <?php bp_members_pagination_count(); ?>
  30.  
  31. </div>
  32.  
  33. <div class="pagination-links" id="member-dir-pag-top">
  34.  
  35. <?php bp_members_pagination_links(); ?>
  36.  
  37. </div>
  38.  
  39. </div>
  40.  
  41. <?php
  42.  
  43. /**
  44. * Fires before the display of the members list.
  45. *
  46. * @since 1.1.0
  47. */
  48. do_action( 'bp_before_directory_members_list' ); ?>
  49.  
  50. <ul id="members-list" class="item-list row kleo-isotope masonry" aria-live="assertive" aria-relevant="all">
  51.  
  52. <?php while ( bp_members() ) : bp_the_member(); ?>
  53.  
  54. <?php if (is_user_logged_in() ) {
  55. $member_type = bp_get_member_type( bp_get_member_user_id(), false )['0'];
  56.  
  57. } ?>
  58.  
  59. <li class="kleo-masonry-item">
  60. <div class="member-inner-list animated animate-when-almost-visible bottom-to-top <?php echo 'member-type-' . $member_type ?>">
  61. <div class="item-avatar rounded">
  62. <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
  63. <?php do_action('bp_member_online_status', bp_get_member_user_id()); ?>
  64. </div>
  65.  
  66. <div class="item">
  67. <div class="item-title">
  68. <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
  69. </div>
  70.  
  71. <?php if(function_exists( 'bp_core_iso8601_date' )) : ?>
  72. <div class="item-meta"><span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_member_last_active( array( 'relative' => false ) ) ); ?>"><?php bp_member_last_active(); ?></span></div>
  73. <?php else: ?>
  74. <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
  75. <?php endif; ?>
  76.  
  77. <?php if ( bp_get_member_latest_update() ) : ?>
  78. <span class="update"> <?php bp_member_latest_update(); ?></span>
  79. <?php endif; ?>
  80.  
  81. <?php
  82.  
  83. /**
  84. * Fires inside the display of a directory member item.
  85. *
  86. * @since 1.1.0
  87. */
  88. do_action( 'bp_directory_members_item' ); ?>
  89.  
  90. <?php
  91. /***
  92. * If you want to show specific profile fields here you can,
  93. * but it'll add an extra query for each member in the loop
  94. * (only one regardless of the number of fields you show):
  95. *
  96. * bp_member_profile_data( 'field=the field name' );
  97. */
  98. ?>
  99. </div>
  100.  
  101. <div class="action">
  102.  
  103. <?php
  104.  
  105. /**
  106. * Fires inside the members action HTML markup to display actions.
  107. *
  108. * @since 1.1.0
  109. */
  110. do_action( 'bp_directory_members_actions' ); ?>
  111.  
  112. </div>
  113.  
  114. </div><!--end member-inner-list-->
  115. </li>
  116.  
  117. <?php endwhile; ?>
  118.  
  119. </ul>
  120.  
  121. <?php
  122.  
  123. /**
  124. * Fires after the display of the members list.
  125. *
  126. * @since 1.1.0
  127. */
  128. do_action( 'bp_after_directory_members_list' ); ?>
  129.  
  130. <?php bp_member_hidden_fields(); ?>
  131.  
  132. <div id="pag-bottom" class="pagination">
  133.  
  134. <div class="pag-count" id="member-dir-count-bottom">
  135.  
  136. <?php bp_members_pagination_count(); ?>
  137.  
  138. </div>
  139.  
  140. <div class="pagination-links" id="member-dir-pag-bottom">
  141.  
  142. <?php bp_members_pagination_links(); ?>
  143.  
  144. </div>
  145.  
  146. </div>
  147.  
  148. <?php else: ?>
  149.  
  150. <div id="message" class="info">
  151. <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
  152. </div>
  153.  
  154. <?php endif; ?>
  155.  
  156. <?php
  157.  
  158. /**
  159. * Fires after the display of the members loop.
  160. *
  161. * @since 1.2.0
  162. */
  163. do_action( 'bp_after_members_loop' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment