WordPress/wp-includes/block-supports
Sergey Biryukov 1ce5dc7444 Code Modernization: Replace usage of `strpos()` with `str_contains()`.
`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 [52039], [52040], [52326], [55703], [55710], [55987].

Props Soean, spacedmonkey, costdev, dingo_d, azaozz, mikeschroder, flixos90, peterwilsoncc, SergeyBiryukov.
Fixes #58206.
Built from https://develop.svn.wordpress.org/trunk@55988


git-svn-id: http://core.svn.wordpress.org/trunk@55500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 14:36:26 +00:00
..
align.php Docs: Miscellaneous Docblock corrections in several `/block-supports` files. 2021-12-01 23:16:04 +00:00
border.php Editor: Backport block supports (border, color, elements, spacing) from Gutenberg to WP 6.1. 2022-09-19 20:14:10 +00:00
colors.php Docs: Use third-person singular verbs for Block Supports related function descriptions, as per docblocks standards. 2022-11-24 22:36:11 +00:00
custom-classname.php Docs: Use third-person singular verbs for Block Supports related function descriptions, as per docblocks standards. 2022-11-24 22:36:11 +00:00
dimensions.php Editor: Introduce minimum height dimensions block support. 2023-02-01 16:15:15 +00:00
duotone.php Code Modernization: Replace usage of `strpos()` with `str_contains()`. 2023-06-22 14:36:26 +00:00
elements.php Editor: Use `WP_HTML_Tag_Processor` in `wp_render_elements_support()`. 2023-02-06 19:43:16 +00:00
generated-classname.php Docs: Various docblock fixes in Block Supports related functions. 2022-11-24 22:52:11 +00:00
layout.php Editor: add grid layout type 2023-06-22 04:06:26 +00:00
position.php Editor: `svn add` new files missed in [55285]. 2023-02-07 18:11:18 +00:00
settings.php Block editor: Add frontend block-level settings to the core. 2023-02-07 12:42:20 +00:00
spacing.php Docs: Various docblock fixes in Block Supports related functions. 2022-11-24 22:52:11 +00:00
typography.php Editor: add text columns to typography support. 2023-06-22 08:18:19 +00:00
utils.php Editor: Backport block support changes from the Gutenberg plugin 2022-04-05 12:08:02 +00:00