Make WordPress Core


Ignore:
Timestamp:
05/17/2016 08:32:09 PM (8 years ago)
Author:
swissspidy
Message:

Embeds: Change attachment metadata condition to prevent a warning in the embeds template.

See #35237.
Fixes #36838 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme-compat/embed-content.php

    r37087 r37452  
    2828
    2929        $meta = wp_get_attachment_metadata( $thumbnail_id );
    30         if ( is_array( $meta ) ) {
     30        if ( ! empty( $meta['sizes'] ) ) {
    3131            foreach ( $meta['sizes'] as $size => $data ) {
    3232                if ( $data['width'] / $data['height'] > $aspect_ratio ) {
Note: See TracChangeset for help on using the changeset viewer.