WordPress/wp-admin/includes
Sergey Biryukov 59f1c9c205 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], [55990], [56014], [56021], [56031], [56032], [56065], [56241].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-17 13:18:27 +00:00
..
admin-filters.php General: add nonce for block theme preview activation. 2023-07-11 05:03:23 +00:00
admin.php General: add nonce for block theme preview activation. 2023-07-11 05:03:23 +00:00
ajax-actions.php Code Modernization: Use str_contains() in a few more places. 2023-07-17 13:18:27 +00:00
bookmark.php Docs: Various improvements in Bookmark Administration API function descriptions, as per docblocks standards. 2023-05-03 10:03:21 +00:00
class-automatic-upgrader-skin.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-bulk-plugin-upgrader-skin.php
class-bulk-theme-upgrader-skin.php
class-bulk-upgrader-skin.php Upgrade/Install: Update 'show details' button change. 2023-06-25 22:57:26 +00:00
class-core-upgrader.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-custom-background.php I18N: Provide gettext context to disambiguate various translation strings. 2023-06-05 21:05:22 +00:00
class-custom-image-header.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-file-upload-upgrader.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 06:34:27 +00:00
class-ftp-pure.php
class-ftp-sockets.php
class-ftp.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-language-pack-upgrader-skin.php
class-language-pack-upgrader.php Code Modernization: Replace usage of substr() with str_starts_with() and str_ends_with(). 2023-06-22 14:57:24 +00:00
class-pclzip.php Docs: Fix a few more typos in DocBlocks and inline comments. 2023-05-19 13:27:20 +00:00
class-plugin-installer-skin.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 06:34:27 +00:00
class-plugin-upgrader-skin.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 06:34:27 +00:00
class-plugin-upgrader.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-theme-installer-skin.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 06:34:27 +00:00
class-theme-upgrader-skin.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 06:34:27 +00:00
class-theme-upgrader.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-walker-category-checklist.php
class-walker-nav-menu-checklist.php
class-walker-nav-menu-edit.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-ajax-upgrader-skin.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-wp-application-passwords-list-table.php Docs: A host of corrections and improvements to inline documentation. 2023-05-08 22:37:24 +00:00
class-wp-automatic-updater.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-comments-list-table.php Administration: Backwards compatibility for new sortable keys. 2023-06-23 17:49:28 +00:00
class-wp-community-events.php
class-wp-debug-data.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-filesystem-base.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-filesystem-direct.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-filesystem-ftpext.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-filesystem-ftpsockets.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-filesystem-ssh2.php Filesystem API: Define password as null if not set when using SSH2 with public/private keys. 2023-06-29 17:05:30 +00:00
class-wp-importer.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 12:57:20 +00:00
class-wp-internal-pointers.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 12:57:20 +00:00
class-wp-links-list-table.php Administration: Set accessible state for list table headers. 2023-06-21 21:47:23 +00:00
class-wp-list-table-compat.php
class-wp-list-table.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-media-list-table.php Media: Only show “Copy” and “Download” actions when an attachment URL is available. 2023-06-27 16:29:28 +00:00
class-wp-ms-sites-list-table.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-wp-ms-themes-list-table.php Administration: Set accessible state for list table headers. 2023-06-21 21:47:23 +00:00
class-wp-ms-users-list-table.php Administration: Set accessible state for list table headers. 2023-06-21 21:47:23 +00:00
class-wp-plugin-install-list-table.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-plugins-list-table.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-post-comments-list-table.php
class-wp-posts-list-table.php Administration: Set accessible state for list table headers. 2023-06-21 21:47:23 +00:00
class-wp-privacy-data-export-requests-list-table.php
class-wp-privacy-data-removal-requests-list-table.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 06:34:27 +00:00
class-wp-privacy-policy-content.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-privacy-requests-table.php Administration: Make checkbox column clickable. 2023-06-21 01:54:19 +00:00
class-wp-screen.php Code Modernization: Replace usage of substr() with str_starts_with() and str_ends_with(). 2023-06-22 14:57:24 +00:00
class-wp-site-health-auto-updates.php Code Modernization: Replace usage of substr() with str_starts_with() and str_ends_with(). 2023-06-22 14:57:24 +00:00
class-wp-site-health.php I18n: Improve the use of dashicons-external icon for external links. 2023-07-11 12:59:25 +00:00
class-wp-site-icon.php Coding Standards: Use strict comparison in wp-admin/includes/class-wp-site-icon.php. 2023-04-23 04:02:18 +00:00
class-wp-terms-list-table.php Administration: Set accessible state for list table headers. 2023-06-21 21:47:23 +00:00
class-wp-theme-install-list-table.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-06-14 06:34:27 +00:00
class-wp-themes-list-table.php Docs: A host of corrections and improvements to inline documentation. 2023-05-08 22:37:24 +00:00
class-wp-upgrader-skin.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-wp-upgrader-skins.php
class-wp-upgrader.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
class-wp-users-list-table.php Users: Remove password reset links when the feature is not allowed for a specific user. 2023-07-06 12:47:23 +00:00
comment.php
continents-cities.php
credits.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
dashboard.php I18n: Improve the use of dashicons-external icon for external links. 2023-07-11 12:59:25 +00:00
deprecated.php Code Modernization: Replace usage of substr() with str_starts_with() and str_ends_with(). 2023-06-22 14:57:24 +00:00
edit-tag-messages.php
export.php General: Replace some instances of "blog" with "site" in documentation, translator comments, and user-facing text strings. 2023-06-19 18:27:27 +00:00
file.php Filesystem API: Ensure wp_tempnam() does not produce file names longer than 255 characters as this is the limit on most filesystems. 2023-07-10 20:33:23 +00:00
image-edit.php Media: Set default state for image rotation button. 2023-07-13 16:42:27 +00:00
image.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
import.php
list-table.php
media.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
menu.php Coding Standards: Use strict comparison in wp-admin/includes/menu.php. 2023-05-31 14:53:26 +00:00
meta-boxes.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 19:52:24 +00:00
misc.php Docs: Document the return value of wp_check_php_version() using hash notation. 2023-07-06 00:16:23 +00:00
ms-admin-filters.php
ms-deprecated.php
ms.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
nav-menu.php Menus: Fix critical errors when the page_on_front and/or page_for_posts options contain references to non-existing posts. 2023-07-14 21:47:22 +00:00
network.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
noop.php Coding Standards: Fix brace indentation in wp-align/includes/noop.php. 2022-11-26 09:12:17 +00:00
options.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
plugin-install.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
plugin.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
post.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
privacy-tools.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
revision.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
schema.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
screen.php
taxonomy.php Coding Standards: Use strict comparison in wp-admin/includes/taxonomy.php. 2023-03-10 07:04:20 +00:00
template.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
theme-install.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
theme.php Code Modernization: Use str_contains() in a few more places. 2023-07-17 13:18:27 +00:00
translation-install.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
update-core.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
update.php Coding Standards: Use strict comparison in wp-admin/includes/update.php. 2023-06-01 15:14:27 +00:00
upgrade.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-09 20:07:22 +00:00
user.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
widgets.php Docs: Various corrections and improvements to inline docs and docblocks. 2023-05-12 21:35:21 +00:00