Revert r13103 and merely restrict \$content_width obeying to is_admin(). fixes #12146

git-svn-id: http://svn.automattic.com/wordpress/trunk@13140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-02-14 06:34:47 +00:00
parent 4146a44f36
commit e4283aed00

View File

@ -64,6 +64,8 @@ function image_constrain_size_for_editor($width, $height, $size = 'medium') {
} elseif ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ) ) ) {
$max_width = intval( $_wp_additional_image_sizes[$size]['width'] );
$max_height = intval( $_wp_additional_image_sizes[$size]['height'] );
if ( intval($content_width) > 0 && is_admin() ) // Only in admin. Assume that theme authors know what they're doing.
$max_width = min( intval($content_width), $max_width );
}
// $size == 'full' has no constraint
else {