From da9057fd6de2e325f7b224b6487cc0fd4774e581 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 8 Jan 2015 21:11:46 +0000 Subject: [PATCH] Use `&&` instead of `and` in the 3 places where `and` was used. See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31099 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/image.php | 2 +- src/wp-includes/media.php | 2 +- src/wp-includes/shortcodes.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php index 5fc7161e4f..7c12dd6ee1 100644 --- a/src/wp-admin/includes/image.php +++ b/src/wp-admin/includes/image.php @@ -320,7 +320,7 @@ function wp_read_image_metadata( $file ) { elseif ( ! empty( $iptc['2#080'][0] ) ) // creator / legacy byline $meta['credit'] = trim( $iptc['2#080'][0] ); - if ( ! empty( $iptc['2#055'][0] ) and ! empty( $iptc['2#060'][0] ) ) // created date and time + if ( ! empty( $iptc['2#055'][0] ) && ! empty( $iptc['2#060'][0] ) ) // created date and time $meta['created_timestamp'] = strtotime( $iptc['2#055'][0] . ' ' . $iptc['2#060'][0] ); if ( ! empty( $iptc['2#116'][0] ) ) // copyright diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index fddeb4a758..73bc7f5273 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -359,7 +359,7 @@ function get_image_tag($id, $alt, $title, $align, $size='medium') { * @return array First item is the width, the second item is the height. */ function wp_constrain_dimensions( $current_width, $current_height, $max_width=0, $max_height=0 ) { - if ( !$max_width and !$max_height ) + if ( !$max_width && !$max_height ) return array( $current_width, $current_height ); $width_ratio = $height_ratio = 1.0; diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php index 99eec774dc..db41da21a0 100644 --- a/src/wp-includes/shortcodes.php +++ b/src/wp-includes/shortcodes.php @@ -311,7 +311,7 @@ function shortcode_parse_atts($text) { $atts[strtolower($m[3])] = stripcslashes($m[4]); elseif (!empty($m[5])) $atts[strtolower($m[5])] = stripcslashes($m[6]); - elseif (isset($m[7]) and strlen($m[7])) + elseif (isset($m[7]) && strlen($m[7])) $atts[] = stripcslashes($m[7]); elseif (isset($m[8])) $atts[] = stripcslashes($m[8]);