Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#18645 closed enhancement (maybelater)

add filter to wp_dropdown_users() in post_author_meta_box

Reported by: jkudish Owned by:
Priority: normal Milestone:
Component: Users Version: 3.3
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

In a use case where I don't want to show "authors" only in the author dropdown but want to be able to assign a post to any registered user, there is no way currently to filter the author's meta box. The proposed patch adds a filter on $who variable of the dropdown.

Attachments (3)

18645.diff​ (604 bytes ) - added by jkudish 15 years ago.
18645-2.diff​ (640 bytes ) - added by jkudish 15 years ago.
Patch which filters the whole array
18645-3.diff​ (655 bytes ) - added by jkudish 15 years ago.
removed _ref_array() and added (array) cast.

Download all attachments as: .zip

Change History (9)

#1 @jkudish
15 years ago

*the $who, typo :)

#2 @jkudish
15 years ago

  • Summary add filter to wp_dropdown_users in post_author_meta_box_who → add filter to wp_dropdown_users() in post_author_meta_box

#3 @nacin
15 years ago

I would unregister the meta box and re-register it with your own wp_dropdown_users() call.

#4 @nacin
15 years ago

For a filter, I'd like to see something on the entire array, rather than just the 'who' value. But switching out the meta box (and using the same save code) is a simple workaround.

@jkudish
15 years ago

Patch which filters the whole array

@jkudish
15 years ago

removed _ref_array() and added (array) cast.

#5 @jkudish
14 years ago

  • Resolution → maybelater
  • Status new → closed

#6 @helenyhou
14 years ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.