@@ 1124-1132 (lines=9) @@ | ||
1121 | } |
|
1122 | $max_width = max( $max_width, $theme_width ); |
|
1123 | ||
1124 | if ( $has_flex_height && ( ! $has_flex_width || $width > $max_width ) ) { |
|
1125 | $dst['dst_height'] = absint( $height * ( $max_width / $width ) ); |
|
1126 | } |
|
1127 | elseif ( $has_flex_height && $has_flex_width ) { |
|
1128 | $dst['dst_height'] = $height; |
|
1129 | } |
|
1130 | else { |
|
1131 | $dst['dst_height'] = $theme_height; |
|
1132 | } |
|
1133 | ||
1134 | if ( $has_flex_width && ( ! $has_flex_height || $width > $max_width ) ) { |
|
1135 | $dst['dst_width'] = absint( $width * ( $max_width / $width ) ); |
|
@@ 1134-1142 (lines=9) @@ | ||
1131 | $dst['dst_height'] = $theme_height; |
|
1132 | } |
|
1133 | ||
1134 | if ( $has_flex_width && ( ! $has_flex_height || $width > $max_width ) ) { |
|
1135 | $dst['dst_width'] = absint( $width * ( $max_width / $width ) ); |
|
1136 | } |
|
1137 | elseif ( $has_flex_width && $has_flex_height ) { |
|
1138 | $dst['dst_width'] = $width; |
|
1139 | } |
|
1140 | else { |
|
1141 | $dst['dst_width'] = $theme_width; |
|
1142 | } |
|
1143 | ||
1144 | return $dst; |
|
1145 | } |