Coding Standards: Remove extra parentheses in a few str_contains() conditionals.

Follow-up to [55988].

Props Cybr.
See #58831.
Built from https://develop.svn.wordpress.org/trunk@56596


git-svn-id: http://core.svn.wordpress.org/trunk@56108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-09-16 06:50:23 +00:00
parent 127209a9fe
commit 30a1eec22a
4 changed files with 6 additions and 4 deletions

View File

@ -4522,7 +4522,7 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
$url = str_replace( "'", ''', $url ); $url = str_replace( "'", ''', $url );
} }
if ( ( str_contains( $url, '[' ) ) || ( str_contains( $url, ']' ) ) ) { if ( str_contains( $url, '[' ) || str_contains( $url, ']' ) ) {
$parsed = wp_parse_url( $url ); $parsed = wp_parse_url( $url );
$front = ''; $front = '';

View File

@ -91,7 +91,9 @@ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
} }
} elseif ( stripos( $_SERVER['HTTP_USER_AGENT'], 'safari' ) !== false ) { } elseif ( stripos( $_SERVER['HTTP_USER_AGENT'], 'safari' ) !== false ) {
$is_safari = true; $is_safari = true;
} elseif ( ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) || str_contains( $_SERVER['HTTP_USER_AGENT'], 'Trident' ) ) && str_contains( $_SERVER['HTTP_USER_AGENT'], 'Win' ) ) { } elseif ( ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) || str_contains( $_SERVER['HTTP_USER_AGENT'], 'Trident' ) )
&& str_contains( $_SERVER['HTTP_USER_AGENT'], 'Win' )
) {
$is_winIE = true; $is_winIE = true;
} elseif ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) && str_contains( $_SERVER['HTTP_USER_AGENT'], 'Mac' ) ) { } elseif ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) && str_contains( $_SERVER['HTTP_USER_AGENT'], 'Mac' ) ) {
$is_macIE = true; $is_macIE = true;

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.4-alpha-56595'; $wp_version = '6.4-alpha-56596';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -107,7 +107,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
$content_transfer_encoding = explode( ';', $content_transfer_encoding ); $content_transfer_encoding = explode( ';', $content_transfer_encoding );
$content_transfer_encoding = $content_transfer_encoding[0]; $content_transfer_encoding = $content_transfer_encoding[0];
} }
if ( ( 'multipart/alternative' === $content_type ) && ( str_contains( $line, 'boundary="' ) ) && ( '' === $boundary ) ) { if ( 'multipart/alternative' === $content_type && str_contains( $line, 'boundary="' ) && '' === $boundary ) {
$boundary = trim( $line ); $boundary = trim( $line );
$boundary = explode( '"', $boundary ); $boundary = explode( '"', $boundary );
$boundary = $boundary[1]; $boundary = $boundary[1];