[wp-trac] [WordPress Trac] #65408: Code Modernization: Use str_contains() instead of strpos()
WordPress Trac
noreply at wordpress.org
Thu Jun 4 14:08:42 UTC 2026
#65408: Code Modernization: Use str_contains() instead of strpos()
------------------------------+-------------------------------
Reporter: Soean | Owner: audrasjb
Type: enhancement | Status: closed
Priority: normal | Milestone: 7.1
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses: coding-standards
------------------------------+-------------------------------
Changes (by audrasjb):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"62461" 62461]:
{{{
#!CommitTicketReference repository="" revision="62461"
Code Modernization: Replace `strpos()` with `str_contains()`.
This changeset replaces recently introduced `false !== strpos( ... )` and
`false === strpos( ... )` with `str_contains()` in core files, making the
code more readable and consistent, as well as better aligned with modern
development practices.
Introduced in [60269] and [60939]. Fixed during WCEU2026 contribution day.
Follow-up to [52039], [55988], [56245], [60269] and [60939].
Props Soean, mukesh27.
Fixes #65408.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65408#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list