Embeds: Change attachment metadata condition to prevent a warning in the embeds template.
See #35237. Fixes #36838 for trunk. Built from https://develop.svn.wordpress.org/trunk@37452 git-svn-id: http://core.svn.wordpress.org/trunk@37420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6af8a5d48c
commit
d60b748652
|
@ -27,7 +27,7 @@
|
||||||
$image_size = 'full'; // Fallback.
|
$image_size = 'full'; // Fallback.
|
||||||
|
|
||||||
$meta = wp_get_attachment_metadata( $thumbnail_id );
|
$meta = wp_get_attachment_metadata( $thumbnail_id );
|
||||||
if ( is_array( $meta ) ) {
|
if ( ! empty( $meta['sizes'] ) ) {
|
||||||
foreach ( $meta['sizes'] as $size => $data ) {
|
foreach ( $meta['sizes'] as $size => $data ) {
|
||||||
if ( $data['width'] / $data['height'] > $aspect_ratio ) {
|
if ( $data['width'] / $data['height'] > $aspect_ratio ) {
|
||||||
$aspect_ratio = $data['width'] / $data['height'];
|
$aspect_ratio = $data['width'] / $data['height'];
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-alpha-37449';
|
$wp_version = '4.6-alpha-37452';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue