[wp-trac] [WordPress Trac] #58012: Replace usage of strpos with str_starts_with

WordPress Trac noreply at wordpress.org
Wed Mar 29 14:02:06 UTC 2023


#58012: Replace usage of strpos with str_starts_with
----------------------------------------+------------------------------
 Reporter:  spacedmonkey                |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  General                     |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by costdev):

 +1

 We've been trying to use `str_starts_with()` (and similar) for some time,
 making replacements here and there in existing code. Any remaining
 instances should be checked and changed to `str_starts_with()` and `!
 str_starts_with()` as appropriate.

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


More information about the wp-trac mailing list