WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#18645 closed enhancement (maybelater)

add filter to wp_dropdown_users() in post_author_meta_box

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

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 10 years ago.
18645-2.diff (640 bytes) - added by jkudish 10 years ago.
Patch which filters the whole array
18645-3.diff (655 bytes) - added by jkudish 10 years ago.
removed _ref_array() and added (array) cast.

Download all attachments as: .zip

Change History (9)

@jkudish
10 years ago

#1 @jkudish
10 years ago

*the $who, typo :)

#2 @jkudish
10 years ago

  • Summary changed from add filter to wp_dropdown_users in post_author_meta_box_who to add filter to wp_dropdown_users() in post_author_meta_box

#3 @nacin
10 years ago

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

#4 @nacin
10 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
10 years ago

Patch which filters the whole array

@jkudish
10 years ago

removed _ref_array() and added (array) cast.

#5 @jkudish
10 years ago

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

#6 @helenyhou
10 years ago

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