|
@@ 70-78 (lines=9) @@
|
| 67 |
|
$height = intval( $attr['height'] ); |
| 68 |
|
|
| 69 |
|
// Support w and h argument as fallback. |
| 70 |
|
if ( empty( $width ) && isset( $args['w'] ) ) { |
| 71 |
|
$width = intval( $args['w'] ); |
| 72 |
|
|
| 73 |
|
if ( empty( $height ) && ! isset( $args['h'] ) ) { |
| 74 |
|
// The case where w=300 is specified without h=200, otherwise $height |
| 75 |
|
// will always equal the default of 300, no matter what w was set to. |
| 76 |
|
$height = round( ( $width / 640 ) * 360 ); |
| 77 |
|
} |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
if ( empty( $height ) && isset( $args['h'] ) ) { |
| 81 |
|
$height = (int) $args['h']; |
|
@@ 80-86 (lines=7) @@
|
| 77 |
|
} |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
if ( empty( $height ) && isset( $args['h'] ) ) { |
| 81 |
|
$height = (int) $args['h']; |
| 82 |
|
|
| 83 |
|
if ( ! isset( $args['w'] ) ) { |
| 84 |
|
$width = round( ( $height / 360 ) * 640 ); |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
if ( ! $width && ! empty( $content_width ) ) { |
| 89 |
|
$width = absint( $content_width ); |