[wp-trac] [WordPress Trac] #64773: Code Modernization: Replace usage of strpos() with str_starts_with().
WordPress Trac
noreply at wordpress.org
Mon Mar 2 09:10:38 UTC 2026
#64773: Code Modernization: Replace usage of strpos() with str_starts_with().
------------------------------+-----------------------------
Reporter: Soean | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 7.0
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"61781" 61781]:
{{{
#!CommitTicketReference repository="" revision="61781"
Code Modernization: Use `str_starts_with()` in `WP_Duotone` class methods.
This aims to make the code more readable and consistent, as the function
is already used extensively in core files.
WordPress core includes a polyfill for `str_starts_with()` on PHP < 8.0 as
of WordPress 5.9.
Follow-up to [55703], [58313].
Props Soean, mukesh27.
Fixes #64773.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64773#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list