From 8fbdf18a6b072bb67825c90588bf94466affc3d7 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 27 Jan 2010 14:38:48 +0000 Subject: [PATCH] Respect maximum embed height. Props Viper007Bond. fixes #11980 git-svn-id: http://svn.automattic.com/wordpress/trunk@12875 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index f04f62814..ebcc4ec8e 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1245,15 +1245,20 @@ function wp_embed_defaults() { $width = get_option('embed_size_w'); - if ( !$width && !empty($theme_width) ) + if ( empty($width) && !empty($theme_width) ) $width = $theme_width; - if ( !$width ) + if ( empty($width) ) $width = 500; + $height = get_option('embed_size_h'); + + if ( empty($height) ) + $height = 700; + return apply_filters( 'embed_defaults', array( - 'width' => $width, - 'height' => 700, + 'width' => $width, + 'height' => $height, ) ); }