Changeset 15876
- Timestamp:
- 10/20/2010 08:43:32 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/default-list-tables.php
r15870 r15876 2959 2959 <td valign="top"> 2960 2960 <?php 2961 $blogusers = get_users_of_blog( $blog['blog_id'] );2961 $blogusers = get_users_of_blog( $blog['blog_id'], array('number' => 6) ); 2962 2962 if ( is_array( $blogusers ) ) { 2963 2963 $blogusers_warning = ''; -
trunk/wp-admin/network/sites.php
r15759 r15876 258 258 259 259 // Site users 260 $blogusers = get_users_of_blog( $id ); 261 260 $blogusers = get_users_of_blog( $id, array('number' => 20) ); 262 261 if ( is_array( $blogusers ) ) { 263 262 echo '<div id="blogedit_blogusers" class="postbox"><h3 class="hndle"><span>' . __( 'Site Users' ) . '</span></h3><div class="inside">'; 264 263 echo '<table class="form-table">'; 265 264 echo "<tr><th>" . __( 'User' ) . "</th><th>" . __( 'Role' ) . "</th><th>" . __( 'Password' ) . "</th><th>" . __( 'Remove' ) . "</th></tr>"; 265 $user_count = 0; 266 266 foreach ( $blogusers as $user_id => $user_object ) { 267 $user_count++; 267 268 $existing_role = reset( $user_object->roles ); 268 269 … … 291 292 echo "</table>"; 292 293 echo '<p class="submit" style="text-align:center;"><input type="submit" name="Submit" value="' . esc_attr__( 'Update Options' ) . '" /></p>'; 294 if ( 20 == $user_count ) 295 echo '<p>' . sprintf( __('First 20 users shown. <a href="%s">Manage all users</a>.'), get_admin_url($id, 'users.php') ) . '</p>'; 293 296 echo "</div></div>"; 294 297 } -
trunk/wp-includes/user.php
r15873 r15876 564 564 * 565 565 * @param int $id Blog ID. 566 * @param array $args Optional query arguments passed to get_users() 566 567 * @return array List of users that are part of that Blog ID 567 568 */ 568 function get_users_of_blog( $id = '' ) {569 function get_users_of_blog( $id = '', $args = array() ) { 569 570 global $blog_id; 570 571 … … 572 573 $id = (int) $blog_id; 573 574 574 return get_users( array( 'blog_id' => $id ) ); 575 $args['blog_id'] = $id; 576 return get_users( $args ); 575 577 } 576 578
Note: See TracChangeset
for help on using the changeset viewer.