|
@@ 145-151 (lines=7) @@
|
| 142 |
|
* 'width' and 'height' params in the iframe url get the exact string from the shortcode |
| 143 |
|
* args, whereas the inline style attribute must have "px" added to it if it has no "%" |
| 144 |
|
*/ |
| 145 |
|
if ( isset( $attributes['width'] ) && preg_match( '|^([0-9]+)(%)?$|', $attributes['width'], $matches ) ) { |
| 146 |
|
$width = $attributes['width']; |
| 147 |
|
$csswidth = $attributes['width']; |
| 148 |
|
if ( count( $matches ) < 3 ) { |
| 149 |
|
$csswidth .= 'px'; |
| 150 |
|
} |
| 151 |
|
} |
| 152 |
|
if ( isset( $attributes['height'] ) && preg_match( '|^([0-9]+)(%)?$|', $attributes['height'], $matches ) ) { |
| 153 |
|
$height = $attributes['height']; |
| 154 |
|
$cssheight = $attributes['height']; |
|
@@ 152-158 (lines=7) @@
|
| 149 |
|
$csswidth .= 'px'; |
| 150 |
|
} |
| 151 |
|
} |
| 152 |
|
if ( isset( $attributes['height'] ) && preg_match( '|^([0-9]+)(%)?$|', $attributes['height'], $matches ) ) { |
| 153 |
|
$height = $attributes['height']; |
| 154 |
|
$cssheight = $attributes['height']; |
| 155 |
|
if ( count( $matches ) < 3 ) { |
| 156 |
|
$cssheight .= 'px'; |
| 157 |
|
} |
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
if ( ! $height ) { |
| 161 |
|
$height = $sizes[ $sizekey ]['height']; |