| @@ 167-168 (lines=2) @@ | ||
| 164 | * @return true|WP_Error |
|
| 165 | */ |
|
| 166 | public function resize( $max_w, $max_h, $crop = false ) { |
|
| 167 | if ( ( $this->size['width'] == $max_w ) && ( $this->size['height'] == $max_h ) ) |
|
| 168 | return true; |
|
| 169 | ||
| 170 | $resized = $this->_resize( $max_w, $max_h, $crop ); |
|
| 171 | ||
| @@ 248-249 (lines=2) @@ | ||
| 245 | * @return bool|WP_Error |
|
| 246 | */ |
|
| 247 | public function resize( $max_w, $max_h, $crop = false ) { |
|
| 248 | if ( ( $this->size['width'] == $max_w ) && ( $this->size['height'] == $max_h ) ) |
|
| 249 | return true; |
|
| 250 | ||
| 251 | $dims = image_resize_dimensions( $this->size['width'], $this->size['height'], $max_w, $max_h, $crop ); |
|
| 252 | if ( ! $dims ) |
|