|
@@ 55-63 (lines=9) @@
|
| 52 |
|
$params = str_replace( array( '&', '&' ), '&', $params ); |
| 53 |
|
parse_str( $params, $args ); |
| 54 |
|
|
| 55 |
|
if ( isset( $args['w'] ) ) { |
| 56 |
|
$width = (int) $args['w']; |
| 57 |
|
|
| 58 |
|
if ( ! isset( $args['h'] ) ) { |
| 59 |
|
// The case where w=300 is specified without h=200, otherwise $height |
| 60 |
|
// will always equal the default of 300, no matter what w was set to. |
| 61 |
|
$height = round( ( $width / 640 ) * 360 ); |
| 62 |
|
} |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
if ( isset( $args['h'] ) ) { |
| 66 |
|
$height = (int) $args['h']; |
|
@@ 65-71 (lines=7) @@
|
| 62 |
|
} |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
if ( isset( $args['h'] ) ) { |
| 66 |
|
$height = (int) $args['h']; |
| 67 |
|
|
| 68 |
|
if ( ! isset( $args['w'] ) ) { |
| 69 |
|
$width = round( ( $height / 360 ) * 640 ); |
| 70 |
|
} |
| 71 |
|
} |
| 72 |
|
|
| 73 |
|
if ( ! $width ) { |
| 74 |
|
$width = absint( $content_width ); |