@@ 83-90 (lines=8) @@ | ||
80 | $max_height = intval(get_option('medium_size_h')); |
|
81 | ||
82 | } |
|
83 | elseif ( $size == 'medium_large' ) { |
|
84 | $max_width = intval( get_option( 'medium_large_size_w' ) ); |
|
85 | $max_height = intval( get_option( 'medium_large_size_h' ) ); |
|
86 | ||
87 | if ( intval( $content_width ) > 0 ) { |
|
88 | $max_width = min( intval( $content_width ), $max_width ); |
|
89 | } |
|
90 | } |
|
91 | elseif ( $size == 'large' ) { |
|
92 | /* |
|
93 | * We're inserting a large size image into the editor. If it's a really |
|
@@ 91-103 (lines=13) @@ | ||
88 | $max_width = min( intval( $content_width ), $max_width ); |
|
89 | } |
|
90 | } |
|
91 | elseif ( $size == 'large' ) { |
|
92 | /* |
|
93 | * We're inserting a large size image into the editor. If it's a really |
|
94 | * big image we'll scale it down to fit reasonably within the editor |
|
95 | * itself, and within the theme's content width if it's known. The user |
|
96 | * can resize it in the editor if they wish. |
|
97 | */ |
|
98 | $max_width = intval(get_option('large_size_w')); |
|
99 | $max_height = intval(get_option('large_size_h')); |
|
100 | if ( intval($content_width) > 0 ) { |
|
101 | $max_width = min( intval($content_width), $max_width ); |
|
102 | } |
|
103 | } elseif ( ! empty( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ) ) ) { |
|
104 | $max_width = intval( $_wp_additional_image_sizes[$size]['width'] ); |
|
105 | $max_height = intval( $_wp_additional_image_sizes[$size]['height'] ); |
|
106 | // Only in admin. Assume that theme authors know what they're doing. |