Changeset 27655 for trunk/src/wp-includes/media.php
- Timestamp:
- 03/22/2014 11:25:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r27640 r27655 1198 1198 $default_height = 360; 1199 1199 1200 $theme_width = $content_width - $outer;1201 $theme_height = round( ( $default_height * $theme_width ) / $default_width );1200 $theme_width = empty( $content_width ) ? $default_width : ( $content_width - $outer ); 1201 $theme_height = empty( $content_width ) ? $default_height : round( ( $default_height * $theme_width ) / $default_width ); 1202 1202 1203 1203 $data = compact( 'type', 'style' ); … … 1586 1586 } else { 1587 1587 // if the video is bigger than the theme 1588 if ( $width > $content_width ) {1588 if ( ! empty( $content_width ) && $width > $content_width ) { 1589 1589 $height = round( ( $height * $content_width ) / $width ); 1590 1590 $width = $content_width; … … 2382 2382 return; 2383 2383 2384 global $content_width; 2385 2384 2386 $defaults = array( 2385 2387 'post' => null, … … 2432 2434 'attachmentCounts' => wp_count_attachments(), 2433 2435 'embedExts' => $exts, 2434 'embedMimes' => $ext_mimes 2436 'embedMimes' => $ext_mimes, 2437 'contentWidth' => $content_width, 2435 2438 ); 2436 2439
Note: See TracChangeset
for help on using the changeset viewer.