From daea21aade295920dd027455332f35375a282aee Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sun, 14 Feb 2010 06:34:47 +0000 Subject: [PATCH] Revert r13103 and merely restrict \$content_width obeying to is_admin(). fixes #12146 git-svn-id: https://develop.svn.wordpress.org/trunk@13140 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/media.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/media.php b/wp-includes/media.php index 9811d0f291..ca27a95582 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -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 {