Opened 3 years ago

Last modified 3 years ago

#13269 new feature request

Ability to list by user role in wp_dropdown_users

Reported by: danielpataki Owned by:
Priority: normal Milestone: Future Release
Component: Role/Capability Version:
Severity: normal Keywords:
Cc:

Description

Hi Everyone!

I am using custom post types and during my experimentation I found it the best to create a new role as well. In short, a website will be hosting seminars, and we have seminars as a custom post type, and seminar speakers as a role (we want to be able to manage them as users, but restrict blog access).

Since they are not authors, they will not show up in the author box on the new post page, so I added a new meta box, which contains a select box to select the speakers we need.

For this I need to create a custom query, but it would be great if a simple attribute were added to the function wp_dropdown_users(). The argument could be "role" and you would need to add the name of the role, like "speaker".

I hope this is something useful to others too! While I have a pretty good understanding of the WP core now, I am not really comfortable checking out files yet, so sorry for not actually writing the code.

Change History (2)

  • Milestone changed from Awaiting Review to Future Release

Users can have more than one role. Also, this would require some serious unserialization or an ugly LIKE query on serialized data.

Will have to wait for #10201, I think.

  • Component changed from General to Role/Capability
Note: See TracTickets for help on using tickets.