Make WordPress Core

Opened 14 years ago

Closed 7 years ago

Last modified 7 years ago

#13269 closed feature request (invalid)

Ability to list by user role in wp_dropdown_users

Reported by: danielpataki's profile danielpataki Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: needs-patch
Focuses: Cc:


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 (6)

#1 @nacin
14 years ago

  • 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.

#2 @nacin
14 years ago

  • Component changed from General to Role/Capability

#3 @chriscct7
10 years ago

I actually wrote a plugin for this reason a while ago found here. This is something that could be implemented as part of #19867

#4 @chriscct7
9 years ago

  • Keywords needs-patch added

#5 @pratikgandhi
7 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Hello @danielpataki

Now we have role as parameter in wp_dropdown_users function so I am closing this ticket.


#6 @netweb
7 years ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.