wordpress-develop/src/wp-includes/rest-api
Sergey Biryukov 997abf4009 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56031 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 10:15:04 +00:00
..
endpoints Code Modernization: Use str_contains() in a few more places. 2023-06-26 10:15:04 +00:00
fields Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:45:36 +00:00
search Docs: Miscellaneous improvements and corrections to docblocks. 2023-02-07 21:19:46 +00:00
class-wp-rest-request.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:34:56 +00:00
class-wp-rest-response.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
class-wp-rest-server.php Code Modernization: Use str_contains() in a few more places. 2023-06-26 10:15:04 +00:00