From 9d44dc664c8f3caa2e5815f97c2e73eecf9bc8e7 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 27 Jan 2010 14:38:48 +0000 Subject: [PATCH] Respect maximum embed height. Props Viper007Bond. fixes #11980 git-svn-id: https://develop.svn.wordpress.org/trunk@12875 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 f04f628149..ebcc4ec8e2 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, ) ); }