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

WordPress Trac noreply at wordpress.org
Tue Feb 23 02:58:20 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                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:

Comment (by boonebgorges):

 [attachment:35913.diff] demonstrates how it can be done. (Look at all that
 red! <3)

 The one slight functional change from the current behavior, made to
 simplify the new `is_object_type()`, is that *all* `$object` properties
 are cast to strings before the `in_array()` checks, instead of just the
 numerical ones. This will be redundant, since all of these properties are
 already strings.

 Anyone have thoughts about the wisdom, or lack thereof, of this kind of

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

More information about the wp-trac mailing list