diff --git src/wp-includes/media.php src/wp-includes/media.php
index 19eba00a6a..bd4407d0fa 100644
|
|
|
function image_hwstring( $width, $height ) { |
| 183 | 183 | * the image is an intermediate size. False on failure. |
| 184 | 184 | */ |
| 185 | 185 | function image_downsize( $id, $size = 'medium' ) { |
| 186 | | $is_image = wp_attachment_is_image( $id ); |
| | 186 | $is_image = false; |
| | 187 | |
| | 188 | /* |
| | 189 | * Check attachment to see if we support returning image attributes for |
| | 190 | * this type. This is to avoid the 'image_downsize' filter and making |
| | 191 | * unneeded DB queries when the type is unsupported. |
| | 192 | */ |
| | 193 | $supported = false; |
| | 194 | $supported_types = array( 'image', 'pdf' ); |
| | 195 | |
| | 196 | foreach ( $supported_types as $type ) { |
| | 197 | $supported = wp_attachment_is( 'type', $id ); |
| | 198 | if ( $supported ) { |
| | 199 | $is_image = ( 'image' === $type ); |
| | 200 | break; |
| | 201 | } |
| | 202 | } |
| | 203 | |
| | 204 | if ( ! $supported ) { |
| | 205 | return false; |
| | 206 | } |
| 187 | 207 | |
| 188 | 208 | /** |
| 189 | 209 | * Filters whether to preempt the output of image_downsize(). |