1 | <?php |
---|
2 | /** |
---|
3 | * BuddyPress - Members 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 | * Fires before the display of the members loop. |
---|
13 | * |
---|
14 | * @since 1.2.0 |
---|
15 | */ |
---|
16 | do_action( 'bp_before_members_loop' ); ?> |
---|
17 | |
---|
18 | <?php if ( bp_get_current_member_type() ) : ?> |
---|
19 | <p class="current-member-type"><?php bp_current_member_type_message() ?></p> |
---|
20 | <?php endif; ?> |
---|
21 | |
---|
22 | <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?> |
---|
23 | |
---|
24 | <div id="pag-top" class="pagination"> |
---|
25 | |
---|
26 | <div class="pag-count" id="member-dir-count-top"> |
---|
27 | |
---|
28 | <?php bp_members_pagination_count(); ?> |
---|
29 | |
---|
30 | </div> |
---|
31 | |
---|
32 | <div class="pagination-links" id="member-dir-pag-top"> |
---|
33 | |
---|
34 | <?php bp_members_pagination_links(); ?> |
---|
35 | |
---|
36 | </div> |
---|
37 | |
---|
38 | </div> |
---|
39 | |
---|
40 | <?php |
---|
41 | |
---|
42 | /** |
---|
43 | * Fires before the display of the members list. |
---|
44 | * |
---|
45 | * @since 1.1.0 |
---|
46 | */ |
---|
47 | do_action( 'bp_before_directory_members_list' ); ?> |
---|
48 | |
---|
49 | <ul id="members-list" class="item-list"> |
---|
50 | |
---|
51 | <?php while ( bp_members() ) : bp_the_member(); ?> |
---|
52 | |
---|
53 | <li <?php bp_member_class(); ?>> |
---|
54 | <div class="item-avatar"> |
---|
55 | <a href="<?php echo esc_url( bp_member_permalink() ); ?>"><?php bp_member_avatar(); ?></a> |
---|
56 | </div> |
---|
57 | |
---|
58 | <div class="item"> |
---|
59 | <div class="item-title"> |
---|
60 | <a href="<?php echo esc_url( bp_member_permalink() ); ?>"><?php echo esc_html( bp_member_name() ); ?></a> |
---|
61 | |
---|
62 | <?php if ( bp_get_member_latest_update() ) : ?> |
---|
63 | |
---|
64 | <span class="update"> <?php bp_member_latest_update(); ?></span> |
---|
65 | |
---|
66 | <?php endif; ?> |
---|
67 | |
---|
68 | </div> |
---|
69 | |
---|
70 | <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div> |
---|
71 | |
---|
72 | <?php |
---|
73 | |
---|
74 | /** |
---|
75 | * Fires inside the display of a directory member item. |
---|
76 | * |
---|
77 | * @since 1.1.0 |
---|
78 | */ |
---|
79 | do_action( 'bp_directory_members_item' ); ?> |
---|
80 | |
---|
81 | <?php |
---|
82 | /*** |
---|
83 | * If you want to show specific profile fields here you can, |
---|
84 | * but it'll add an extra query for each member in the loop |
---|
85 | * (only one regardless of the number of fields you show): |
---|
86 | * |
---|
87 | * bp_member_profile_data( 'field=the field name' ); |
---|
88 | */ |
---|
89 | ?> |
---|
90 | </div> |
---|
91 | |
---|
92 | <div class="action"> |
---|
93 | |
---|
94 | <?php |
---|
95 | |
---|
96 | /** |
---|
97 | * Fires inside the members action HTML markup to display actions. |
---|
98 | * |
---|
99 | * @since 1.1.0 |
---|
100 | */ |
---|
101 | do_action( 'bp_directory_members_actions' ); ?> |
---|
102 | |
---|
103 | </div> |
---|
104 | |
---|
105 | <div class="clear"></div> |
---|
106 | </li> |
---|
107 | |
---|
108 | <?php endwhile; ?> |
---|
109 | |
---|
110 | </ul> |
---|
111 | |
---|
112 | <?php |
---|
113 | |
---|
114 | /** |
---|
115 | * Fires after the display of the members list. |
---|
116 | * |
---|
117 | * @since 1.1.0 |
---|
118 | */ |
---|
119 | do_action( 'bp_after_directory_members_list' ); ?> |
---|
120 | |
---|
121 | <?php bp_member_hidden_fields(); ?> |
---|
122 | |
---|
123 | <div id="pag-bottom" class="pagination"> |
---|
124 | |
---|
125 | <div class="pag-count" id="member-dir-count-bottom"> |
---|
126 | |
---|
127 | <?php bp_members_pagination_count(); ?> |
---|
128 | |
---|
129 | </div> |
---|
130 | |
---|
131 | <div class="pagination-links" id="member-dir-pag-bottom"> |
---|
132 | |
---|
133 | <?php bp_members_pagination_links(); ?> |
---|
134 | |
---|
135 | </div> |
---|
136 | |
---|
137 | </div> |
---|
138 | |
---|
139 | <?php else: ?> |
---|
140 | |
---|
141 | <div id="message" class="info"> |
---|
142 | <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p> |
---|
143 | </div> |
---|
144 | |
---|
145 | <?php endif; ?> |
---|
146 | |
---|
147 | <?php |
---|
148 | |
---|
149 | /** |
---|
150 | * Fires after the display of the members loop. |
---|
151 | * |
---|
152 | * @since 1.2.0 |
---|
153 | */ |
---|
154 | do_action( 'bp_after_members_loop' ); ?> |
---|