diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index 1cf3d3ff0b..6731a6562a 100644
a
|
b
|
function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) { |
759 | 759 | */ |
760 | 760 | } elseif ( ! empty( $imagedata['sizes']['thumbnail'] ) && $imagedata['sizes']['thumbnail']['width'] >= $size[0] && $imagedata['sizes']['thumbnail']['width'] >= $size[1] ) { |
761 | 761 | $data = $imagedata['sizes']['thumbnail']; |
| 762 | } elseif ( $size[0] == $imagedata['width'] && $size[1] == $imagedata['height'] ) { |
| 763 | $data = array( |
| 764 | 'width' => $imagedata['width'], |
| 765 | 'height' => $imagedata['height'], |
| 766 | 'file' => wp_basename( $imagedata['file'] ), |
| 767 | ); |
762 | 768 | } else { |
763 | 769 | return false; |
764 | 770 | } |
… |
… |
function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) { |
768 | 774 | |
769 | 775 | } elseif ( ! empty( $imagedata['sizes'][ $size ] ) ) { |
770 | 776 | $data = $imagedata['sizes'][ $size ]; |
| 777 | } elseif ( ! empty( $_wp_additional_image_sizes = wp_get_additional_image_sizes() ) && ! empty( $_wp_additional_image_sizes[ $size ] ) && $_wp_additional_image_sizes[ $size ]['width'] == $imagedata['width'] && $_wp_additional_image_sizes[ $size ]['height'] == $imagedata['height'] ) { |
| 778 | $data = array( |
| 779 | 'width' => $imagedata['width'], |
| 780 | 'height' => $imagedata['height'], |
| 781 | 'file' => wp_basename( $imagedata['file'] ), |
| 782 | ); |
771 | 783 | } |
772 | 784 | |
773 | 785 | // If we still don't have a match at this point, return false. |