WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#5111 closed enhancement (fixed)

Make WP_User_Search class plugable

Reported by: Viper007Bond Owned by: westi
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3
Component: General Keywords: has-patch needs-testing
Focuses: 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 (2)

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

Download all attachments as: .zip

Change History (9)

comment:1 @westi8 years ago

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

comment:2 @Viper007Bond8 years ago

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

comment:3 @westi8 years ago

  • Keywords needs-patch added

@hansengel7 years ago

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

comment:4 @hansengel7 years ago

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

@hansengel7 years ago

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

comment:5 @ryan7 years ago

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

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

comment:6 follow-up: @Viper007Bond7 years ago

No no, props to hansengel! <3

comment:7 in reply to: ↑ 6 @Viper007Bond7 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.