mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Coding Standards: Remove extra parentheses in a few str_contains() conditionals.
Follow-up to [55988]. Props Cybr. See #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0c7ddbd67a
commit
8161a8c62a
@ -4522,7 +4522,7 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
|
||||
$url = str_replace( "'", ''', $url );
|
||||
}
|
||||
|
||||
if ( ( str_contains( $url, '[' ) ) || ( str_contains( $url, ']' ) ) ) {
|
||||
if ( str_contains( $url, '[' ) || str_contains( $url, ']' ) ) {
|
||||
|
||||
$parsed = wp_parse_url( $url );
|
||||
$front = '';
|
||||
|
||||
@ -91,7 +91,9 @@ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
|
||||
}
|
||||
} elseif ( stripos( $_SERVER['HTTP_USER_AGENT'], 'safari' ) !== false ) {
|
||||
$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;
|
||||
} elseif ( str_contains( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) && str_contains( $_SERVER['HTTP_USER_AGENT'], 'Mac' ) ) {
|
||||
$is_macIE = true;
|
||||
|
||||
@ -107,7 +107,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
|
||||
$content_transfer_encoding = explode( ';', $content_transfer_encoding );
|
||||
$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 = explode( '"', $boundary );
|
||||
$boundary = $boundary[1];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user