Changeset 47219 for trunk/src/wp-includes/media.php
- Timestamp:
- 02/09/2020 04:52:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r47202 r47219 71 71 $max_width = $size[0]; 72 72 $max_height = $size[1]; 73 } elseif ( $size === 'thumb' || $size === 'thumbnail') {73 } elseif ( 'thumb' === $size || 'thumbnail' === $size ) { 74 74 $max_width = intval( get_option( 'thumbnail_size_w' ) ); 75 75 $max_height = intval( get_option( 'thumbnail_size_h' ) ); … … 79 79 $max_height = 96; 80 80 } 81 } elseif ( $size === 'medium') {81 } elseif ( 'medium' === $size ) { 82 82 $max_width = intval( get_option( 'medium_size_w' ) ); 83 83 $max_height = intval( get_option( 'medium_size_h' ) ); 84 84 85 } elseif ( $size === 'medium_large') {85 } elseif ( 'medium_large' === $size ) { 86 86 $max_width = intval( get_option( 'medium_large_size_w' ) ); 87 87 $max_height = intval( get_option( 'medium_large_size_h' ) ); … … 90 90 $max_width = min( intval( $content_width ), $max_width ); 91 91 } 92 } elseif ( $size === 'large') {92 } elseif ( 'large' === $size ) { 93 93 /* 94 94 * We're inserting a large size image into the editor. If it's a really … … 239 239 $height = $intermediate['height']; 240 240 $is_intermediate = true; 241 } elseif ( $size === 'thumbnail') {241 } elseif ( 'thumbnail' === $size ) { 242 242 // Fall back to the old thumbnail. 243 243 $thumb_file = wp_get_attachment_thumb_file( $id ); … … 1117 1117 */ 1118 1118 function _wp_get_image_size_from_meta( $size_name, $image_meta ) { 1119 if ( $size_name === 'full') {1119 if ( 'full' === $size_name ) { 1120 1120 return array( 1121 1121 absint( $image_meta['width'] ), … … 1555 1555 $image_filename = wp_basename( $image_src ); 1556 1556 1557 if ( $image_filename === wp_basename( $image_meta['file'] )) {1557 if ( wp_basename( $image_meta['file'] ) === $image_filename ) { 1558 1558 $width = (int) $image_meta['width']; 1559 1559 $height = (int) $image_meta['height']; … … 2055 2055 $output .= "</{$itemtag}>"; 2056 2056 2057 if ( ! $html5 && $columns > 0 && ++$i % $columns === 0) {2057 if ( ! $html5 && $columns > 0 && 0 === ++$i % $columns ) { 2058 2058 $output .= '<br style="clear: both" />'; 2059 2059 } 2060 2060 } 2061 2061 2062 if ( ! $html5 && $columns > 0 && $i % $columns !== 0) {2062 if ( ! $html5 && $columns > 0 && 0 !== $i % $columns ) { 2063 2063 $output .= " 2064 2064 <br style='clear: both' />"; … … 2227 2227 $id = intval( $atts['id'] ); 2228 2228 2229 if ( $atts['type'] !== 'audio') {2229 if ( 'audio' !== $atts['type'] ) { 2230 2230 $atts['type'] = 'video'; 2231 2231 }
Note: See TracChangeset
for help on using the changeset viewer.