I am creating a plugin. Now I am listing all the users in a form in my plugin. I need to display all user except current user who is logged in. How to accomplish this task?
<?php wp_dropdown_users(array(‘name’ => ‘user’, ‘exclude’ => ‘get_current_user_id( )’,’show’ => ‘user_login’)); ?>
The above code didn’t fulfill my requirement.
- The topic ‘Exclude current user from wp_dropdown_users list’ is closed to new replies.