Ticket #5111 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years ago

Make WP_User_Search class plugable

Reported by: Viper007Bond Owned by: westi
Priority: normal Milestone: 2.5
Component: General Version: 2.3
Severity: normal Keywords: has-patch needs-testing
Cc:

Description

For our iPhone submission, we needed to list out all users and will eventually add search abilities. The WP_User_Search class in /wp-admin/users.php seems to do this wonderfully. Sadly, you can't include users.php as it outputs stuff.

It'd be nice if that class was pluggable for usage elsewhere.

Attachments

5111.r6603.2.diff Download (5.9 KB) - added by hansengel 4 years ago.
Moves class WP_User_Search into wp-admin/includes/users.php and makes it pluggable
5111.r6603.diff Download (5.9 KB) - added by hansengel 4 years ago.
Moves class WP_User_Search into wp-admin/includes/user.php and makes it pluggable (Use this patch, please)

Change History

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

It sounds like WP_User_Search should be pulled out into wp-admin/includes/user.php.

Are you wanting to use the class solely within the admin? Or does it need to be available from wp-includes?

I don't see a usage for it outside of the admin area really, and even if there is some fringe usage that requires it elsewhere, it's not hard to include() it (as we've done with other files).

  • Keywords needs-patch added

Moves class WP_User_Search into wp-admin/includes/users.php and makes it pluggable

  • Keywords has-patch needs-testing added; needs-patch removed

Moves class WP_User_Search into wp-admin/includes/user.php and makes it pluggable (Use this patch, please)

comment:5   ryan4 years ago

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [6615]) Move WP_User_Search to admin includes. Props Viper007Bond. fixes #5111

comment:6 follow-up: ↓ 7   Viper007Bond4 years ago

No no, props to hansengel! <3

comment:7 in reply to: ↑ 6   Viper007Bond4 years ago

Replying to Viper007Bond:

No no, props to hansengel! <3

Oh, it was just a copy/paste move (no code writing), but still. ;)

Note: See TracTickets for help on using tickets.