[wp-trac] [WordPress Trac] #35913: `is_()` conditional methods should share their logic

WordPress Trac noreply at wordpress.org
Tue Feb 23 02:54:56 UTC 2016


#35913: `is_()` conditional methods should share their logic
--------------------------+-----------------------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Query         |    Version:
 Severity:  normal        |   Keywords:  has-patch 2nd-opinion
  Focuses:                |
--------------------------+-----------------------------------
 Many of the `is_()` methods in `WP_Query` share the nearly the exact same
 logic. As such, they share the exact same bugs, and fixing those bugs
 requires many parallel changes and huge numbers of tests. See #35902 and
 #24674 for some recent examples.

 It's possible to move all the shared logic to a single `protected` utility
 method. It's a bit more abstract, but is much easier to maintain and test.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35913>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list