mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Add query args argument to get_users_of_blog(). Limit number of users fetched for user lists in sites table and edit blog form. see #15053
git-svn-id: https://develop.svn.wordpress.org/trunk@15876 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -563,15 +563,17 @@ 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 = '' ) {
|
||||
function get_users_of_blog( $id = '', $args = array() ) {
|
||||
global $blog_id;
|
||||
|
||||
if ( empty($id) )
|
||||
$id = (int) $blog_id;
|
||||
|
||||
return get_users( array( 'blog_id' => $id ) );
|
||||
$args['blog_id'] = $id;
|
||||
return get_users( $args );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user