Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/wp-includes/embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,11 @@ function get_oembed_response_data( $post, $width ) {
* @param array $min_max_width {
* Minimum and maximum widths for the oEmbed response.
*
* @type int $min Minimum width. Default 200.
* @type int $max Maximum width. Default 600.
* @type int $min Minimum width. Default 200. Required.
* @type int $max Maximum width. Default 600. Required.
* }
*
* @phpstan-param array{ min: positive-int, max: positive-int } $min_max_width
*/
$min_max_width = apply_filters(
'oembed_min_max_width',
Expand All @@ -594,7 +596,6 @@ function get_oembed_response_data( $post, $width ) {
)
);

/** @var array{ min: positive-int, max: positive-int } $min_max_width */
$width = clamp( $width, $min_max_width['min'], $min_max_width['max'] );
$height = max( (int) ceil( $width / 16 * 9 ), 200 );

Expand Down
Loading