Use get_users() instead of get_users_of_blog(). Props scribu. see #15053

git-svn-id: http://svn.automattic.com/wordpress/trunk@15882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-10-21 13:08:47 +00:00
parent ea039810f6
commit 81f23003e3
3 changed files with 3 additions and 5 deletions

View File

@ -2958,7 +2958,7 @@ class WP_Sites_Table extends WP_List_Table {
case 'users': ?>
<td valign="top">
<?php
$blogusers = get_users_of_blog( $blog['blog_id'], array('number' => 6) );
$blogusers = get_users( array( 'blog_id' => $blog['blog_id'], 'number' => 6) );
if ( is_array( $blogusers ) ) {
$blogusers_warning = '';
if ( count( $blogusers ) > 5 ) {

View File

@ -257,7 +257,7 @@ switch ( $action ) {
<?php }
// Site users
$blogusers = get_users_of_blog( $id, array('number' => 20) );
$blogusers = get_users( array( 'blog_id' => $id, 'number' => 20 ) );
if ( is_array( $blogusers ) ) {
echo '<div id="blogedit_blogusers" class="postbox"><h3 class="hndle"><span>' . __( 'Site Users' ) . '</span></h3><div class="inside">';
echo '<table class="form-table">';

View File

@ -563,7 +563,6 @@ function get_users( $args = array() ) {
* @uses $blog_id The Blog id of the blog for those that use more than one blog
*
* @param int $id Blog ID.
* @param array $args Optional query arguments passed to get_users()
* @return array List of users that are part of that Blog ID
*/
function get_users_of_blog( $id = '', $args = array() ) {
@ -572,8 +571,7 @@ function get_users_of_blog( $id = '', $args = array() ) {
if ( empty($id) )
$id = (int) $blog_id;
$args['blog_id'] = $id;
return get_users( $args );
return get_users( array( 'blog_id' => $id ) );
}
/**