Opened 11 months ago

Last modified 11 months ago

#21119 new enhancement

Make WP_User_Query::prepare_query() public

Reported by: scribu Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: normal Keywords: has-patch
Cc:

Description

WP_User_Query tries to follow the pattern from WP_Query, where if you don't pass any args, it won't run the query.

The problem is that you can't do anything with that instance afterwards; both prepare_query() and query() accept no parameters.

Attachments (1)

21119.diff (2.4 KB) - added by scribu 11 months ago.

Download all attachments as: .zip

Change History (2)

With the patch, it's now possible to do this:

// construct $args somehow

$uq = new WP_User_Query;

$uq->prepare_query( $args );

var_dump( $uq->query_where );
Note: See TracTickets for help on using tickets.