[wp-trac] [WordPress Trac] #41339: WP_Comments_Query::__construct() should allow a 'status__not_in' parameter

WordPress Trac noreply at wordpress.org
Sun Jul 30 15:15:26 UTC 2017


#41339: WP_Comments_Query::__construct() should allow a 'status__not_in' parameter
----------------------------------------+-----------------------------
 Reporter:  pbiron                      |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Comments                    |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  has-patch => has-patch needs-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for the patch! The idea seems pretty good to me. I agree with your
 logic that it's only necessary to support arrays.

 We will need some tests to support the new parameter. Specifically, I
 would like to see tests that demonstrate how `status__not_in` works when
 used alongside `status`. It appears that if I pass the same value to both,
 then there will be no 'status' clause at all (since `array_diff( [ 'foo'
 ], [ 'foo' ] )` is an empty array). I'm not sure what the best behavior is
 here, but in any case, it should be documented with unit tests.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41339#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list