|
@@ 105-108 (lines=4) @@
|
| 102 |
|
$poster_width = esc_attr( $media_file['width'] ); |
| 103 |
|
$poster_height = esc_attr( $media_file['height'] ); |
| 104 |
|
$content_width = (int) Jetpack::get_content_width(); |
| 105 |
|
if ( is_numeric( $content_width ) ) { |
| 106 |
|
$poster_height = round( ( $content_width * $poster_height ) / $poster_width ); |
| 107 |
|
$poster_width = $content_width; |
| 108 |
|
} |
| 109 |
|
$media_file = array_merge( |
| 110 |
|
$media_file, |
| 111 |
|
array( |
|
@@ 218-221 (lines=4) @@
|
| 215 |
|
$poster_width = esc_attr( $meta_width ); |
| 216 |
|
$poster_height = esc_attr( $meta_height ); |
| 217 |
|
$content_width = (int) Jetpack::get_content_width(); |
| 218 |
|
if ( is_numeric( $content_width ) ) { |
| 219 |
|
$poster_height = round( ( $content_width * $poster_height ) / $poster_width ); |
| 220 |
|
$poster_width = $content_width; |
| 221 |
|
} |
| 222 |
|
return sprintf( |
| 223 |
|
'<img title="%1$s" alt="%2$s" class="%3$s" src="%4$s"%5$s%6$s>', |
| 224 |
|
esc_attr( get_the_title( $media['id'] ) ), |