mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
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:
parent
012ef7a259
commit
8fbdf18a6b
@ -1245,15 +1245,20 @@ function wp_embed_defaults() {
|
|||||||
|
|
||||||
$width = get_option('embed_size_w');
|
$width = get_option('embed_size_w');
|
||||||
|
|
||||||
if ( !$width && !empty($theme_width) )
|
if ( empty($width) && !empty($theme_width) )
|
||||||
$width = $theme_width;
|
$width = $theme_width;
|
||||||
|
|
||||||
if ( !$width )
|
if ( empty($width) )
|
||||||
$width = 500;
|
$width = 500;
|
||||||
|
|
||||||
|
$height = get_option('embed_size_h');
|
||||||
|
|
||||||
|
if ( empty($height) )
|
||||||
|
$height = 700;
|
||||||
|
|
||||||
return apply_filters( 'embed_defaults', array(
|
return apply_filters( 'embed_defaults', array(
|
||||||
'width' => $width,
|
'width' => $width,
|
||||||
'height' => 700,
|
'height' => $height,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user