[wp-trac] [WordPress Trac] #56791: Coding Standards fixes for WP 6.2
WordPress Trac
noreply at wordpress.org
Mon Nov 14 17:22:08 UTC 2022
#56791: Coding Standards fixes for WP 6.2
----------------------------+-------------------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.2
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
----------------------------+-------------------------------
Comment (by TobiasBg):
In references to ticket:56969#comment:33 and ticket:56969#comment:35
(pinging @peterwilsoncc and @adamsilverstein), I've attached a patch to
replace a `strpos()` check with modern (and polyfilled) `str_contains()`.
The question that arises: There are about 60 `false === strpos( ... )` and
150 `false !== strpos( ... )` in Core that could be replaced by `!
str_contains( ... )` and `str_contains( ... )`. Should these be batch-
replaced or rather left alone until the respective area of code is touched
anyways? Likewise, possible `str_starts_with()` and `str_ends_with()`
usage could be introduced.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56791#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list