@@ 282-285 (lines=4) @@ | ||
279 | $image = array(); |
|
280 | foreach ( (array) $post_images as $post_image ) { |
|
281 | $image['src'] = $post_image['src']; |
|
282 | if ( isset( $post_image['src_width'], $post_image['src_height'] ) ) { |
|
283 | $image['width'] = $post_image['src_width']; |
|
284 | $image['height'] = $post_image['src_height']; |
|
285 | } |
|
286 | } |
|
287 | } |
|
288 | } |
@@ 1169-1172 (lines=4) @@ | ||
1166 | ||
1167 | if ( in_array( $ext, array( 'jpg', 'jpeg', 'png', 'gif' ) ) ) { |
|
1168 | $metadata = wp_get_attachment_metadata( $media_item->ID ); |
|
1169 | if ( isset( $metadata['height'], $metadata['width'] ) ) { |
|
1170 | $response['height'] = $metadata['height']; |
|
1171 | $response['width'] = $metadata['width']; |
|
1172 | } |
|
1173 | ||
1174 | if ( isset( $metadata['sizes'] ) ) { |
|
1175 | /** |
|
@@ 1206-1209 (lines=4) @@ | ||
1203 | ||
1204 | if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) { |
|
1205 | $metadata = wp_get_attachment_metadata( $media_item->ID ); |
|
1206 | if ( isset( $metadata['height'], $metadata['width'] ) ) { |
|
1207 | $response['height'] = $metadata['height']; |
|
1208 | $response['width'] = $metadata['width']; |
|
1209 | } |
|
1210 | ||
1211 | if ( isset( $metadata['length'] ) ) { |
|
1212 | $response['length'] = $metadata['length']; |