Opened 21 months ago

Closed 12 months ago

Last modified 12 months 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:

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

Download all attachments as: .zip

Change History (9)

*the $who, typo :)

  • 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

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

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.

Patch which filters the whole array

removed _ref_array() and added (array) cast.

  • Resolution set to maybelater
  • Status changed from new to closed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.