[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 00:22:04 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):
What about renaming wp_in() to wp_has(), so we can both use the word in
the function and not cause any confusions?
{{{
/**
* Checks if $haystack has $needle
*
* @param string $haystack
* @param string $needle
* @return bool
*/
function wp_has( $haystack, $needle ) {
return false !== strpos( $haystack, $needle );
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19347#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list