Respect maximum embed height. Props Viper007Bond. fixes #11980

git-svn-id: https://develop.svn.wordpress.org/trunk@12875 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-01-27 14:38:48 +00:00
parent bdb3f1ee81
commit 9d44dc664c
1 changed files with 9 additions and 4 deletions

View File

@ -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,
) );
}