|
@@ 374-376 (lines=3) @@
|
| 371 |
|
|
| 372 |
|
// First, check the image tag. Note we only check for pixel sizes now; HTML4 percentages have never been correctly |
| 373 |
|
// supported, so we stopped pretending to support them in JP 9.1.0. |
| 374 |
|
if ( preg_match( '#[\s|"|\']width=["|\']?([\d%]+)["|\']?#i', $images['img_tag'][ $index ], $width_string ) ) { |
| 375 |
|
$width = false === strpos( $width_string[1], '%' ) ? $width_string[1] : false; |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
if ( preg_match( '#[\s|"|\']height=["|\']?([\d%]+)["|\']?#i', $images['img_tag'][ $index ], $height_string ) ) { |
| 379 |
|
$height = false === strpos( $height_string[1], '%' ) ? $height_string[1] : false; |
|
@@ 378-380 (lines=3) @@
|
| 375 |
|
$width = false === strpos( $width_string[1], '%' ) ? $width_string[1] : false; |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
if ( preg_match( '#[\s|"|\']height=["|\']?([\d%]+)["|\']?#i', $images['img_tag'][ $index ], $height_string ) ) { |
| 379 |
|
$height = false === strpos( $height_string[1], '%' ) ? $height_string[1] : false; |
| 380 |
|
} |
| 381 |
|
|
| 382 |
|
// Detect WP registered image size from HTML class. |
| 383 |
|
if ( preg_match( '#class=["|\']?[^"\']*size-([^"\'\s]+)[^"\']*["|\']?#i', $images['img_tag'][ $index ], $size ) ) { |