[wp-trac] [WordPress Trac] #19347: Ugly alert: false !== strpos( $which_one_was_needle, $this_one )

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 24 17:03:16 UTC 2011


#19347: Ugly alert: false !== strpos( $which_one_was_needle, $this_one )
---------------------------------------------+-----------------------------
 Reporter:  nbachiyski                       |       Owner:  westi
     Type:  enhancement                      |      Status:  reviewing
 Priority:  normal                           |   Milestone:  Future Release
Component:  General                          |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch westi-likes 3.4-early  |
---------------------------------------------+-----------------------------

Comment (by merty):

 > These are all string functions so they should accept `$haystack,
 $needle`. merty's suggestion of `wp_has()` works, as does `wp_contains()`.

 Yes, "contains" is so much better. "has" sounds like it's an array-related
 thing.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19347#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list