php - Adding a drop down to select user group when adding new user -
i have managed find following code in user-new.php file adds drop-down menu select user role on adding new user.
<tr class="form-field"> <th scope="row"><label for="role"><?php _e('role'); ?></label></th> <td><select name="role" id="role"> <?php if ( !$new_user_role ) $new_user_role = !empty($current_role) ? $current_role : get_option('default_role'); wp_dropdown_roles($new_user_role); ?> </select> </td> </tr>
my question this, if using wp user groups plugin, how go modifying piece of code allow me select user group instead?
have found following function within groups plugin. should understanding allow me return current groups.
function wp_get_user_groups( $args = array(), $output = 'names', $operator = 'and' )
as function understanding allow me set group user.
function wp_set_terms_for_user( $user_id, $taxonomy, $terms = array(), $bulk = false )
Comments
Post a Comment