Respect maximum embed height. Props Viper007Bond. fixes #11980

git-svn-id: http://svn.automattic.com/wordpress/trunk@12875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-27 14:38:48 +00:00
parent 012ef7a259
commit 8fbdf18a6b
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,
) );
}