[wp-trac] [WordPress Trac] #44169: New filter to short circuit WP_User_Query results
WordPress Trac
noreply at wordpress.org
Fri Sep 21 22:54:08 UTC 2018
#44169: New filter to short circuit WP_User_Query results
--------------------------------------+------------------------------
Reporter: tlovett1 | Owner: adamsilverstein
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Changes (by adamsilverstein):
* owner: (none) => adamsilverstein
* status: new => assigned
Comment:
@tlovett1 - Thanks for the ticket, patch and tests! This looks good and I
can see how this would be useful!
I posted a new combined diff with your patch and tests in
[attachment:"44169.1.diff"].
The diff is unfortunately complicated and hard to look at because of the
existing lines that are intended in the patch (because they sit inside a
conditional); the diff has them oddly interspersed and that makes it hard
to see what you are actually changing.
I created [attachment:"44169-indent-fixed.diff"] as a workaround - in this
diff i left the existing lines unindented so you can much more clearly see
what is added by your patch. in this diff it is clearer that your code
runs the filter passing null, then if the result is still null it runs the
existing code that queries the database. if the result is not null it
continues as normal with the results just after the existing database code
executes.
I'm seeing some test failures I'll look into: https://travis-
ci.org/adamsilverstein/wordpress-develop-fork/jobs/431694171
I'd love to see what @boonebgorges thinks since he did so much of the
original work on #36687 and has a deep understanding of the implications
of any changes here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44169#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list