WordPress/wp-includes/rest-api
Sergey Biryukov ad16732d27 Code Modernization: Use str_contains() in a few more places.
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [55988], [56021].

See #58206.
Built from https://develop.svn.wordpress.org/trunk@56031


git-svn-id: http://core.svn.wordpress.org/trunk@55543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-26 10:17:25 +00:00
..
endpoints Code Modernization: Use str_contains() in a few more places. 2023-06-26 10:17:25 +00:00
fields Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
search Docs: Miscellaneous improvements and corrections to docblocks. 2023-02-07 21:21:18 +00:00
class-wp-rest-request.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-wp-rest-response.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-rest-server.php Code Modernization: Use str_contains() in a few more places. 2023-06-26 10:17:25 +00:00