Embeds: Change attachment metadata condition to prevent a warning in the embeds template.
Merges [36123] to the 4.4 branch. Fixes #35237. Built from https://develop.svn.wordpress.org/branches/4.4@36147 git-svn-id: http://core.svn.wordpress.org/branches/4.4@36113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3ce481f130
commit
50efb6e0e0
|
@ -50,7 +50,7 @@ if ( have_posts() ) :
|
|||
$image_size = 'full'; // Fallback.
|
||||
|
||||
$meta = wp_get_attachment_metadata( $thumbnail_id );
|
||||
if ( is_array( $meta ) ) {
|
||||
if ( ! empty( $meta['sizes'] ) ) {
|
||||
foreach ( $meta['sizes'] as $size => $data ) {
|
||||
if ( $data['width'] / $data['height'] > $aspect_ratio ) {
|
||||
$aspect_ratio = $data['width'] / $data['height'];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4.1-alpha-36146';
|
||||
$wp_version = '4.4.1-alpha-36147';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue