<?php // functions.php function imnobby_get_users_with_role($role){ $args = array( 'role' => $role, ); $users = get_users( $args ); $users_array = array(); foreach ( $users as $user ) { array_push($users_array, $user-> user_login); } return $users_array; }Related Keywords: Developer, How-to, Solved, Get Username with User Role, functions.php, Script, Function
喜歡這篇文章嗎?





(暫時未有評分)
Loading...





(暫時未有評分)
