|
@@ 136-139 (lines=4) @@
|
| 133 |
|
$poster_width = esc_attr( $media_file['width'] ); |
| 134 |
|
$poster_height = esc_attr( $media_file['height'] ); |
| 135 |
|
$content_width = (int) Jetpack::get_content_width(); |
| 136 |
|
if ( is_numeric( $content_width ) ) { |
| 137 |
|
$poster_height = round( ( $content_width * $poster_height ) / $poster_width ); |
| 138 |
|
$poster_width = $content_width; |
| 139 |
|
} |
| 140 |
|
$media_file = array_merge( |
| 141 |
|
$media_file, |
| 142 |
|
array( |
|
@@ 246-249 (lines=4) @@
|
| 243 |
|
$meta_width = $media['width']; |
| 244 |
|
$meta_height = $media['height']; |
| 245 |
|
$content_width = (int) Jetpack::get_content_width(); |
| 246 |
|
if ( is_numeric( $content_width ) ) { |
| 247 |
|
$poster_height = round( ( $content_width * $poster_height ) / $poster_width ); |
| 248 |
|
$poster_width = $content_width; |
| 249 |
|
} |
| 250 |
|
$poster_url = add_query_arg( 'resize', rawurlencode( $poster_width . ',' . $poster_height ), $media['poster'] ); |
| 251 |
|
return sprintf( |
| 252 |
|
'<img |