mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 08:10:04 +00:00
Media: Make filename checks less strict in 'wp_image_src_get_dimensions'.
This modifies the check for full size files so that only the basename is compared with the image `src` to avoid misses whenever the `src` path has been modified. Props ianmjones. Fixes: #52417. git-svn-id: https://develop.svn.wordpress.org/trunk@50144 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1604,7 +1604,7 @@ function wp_image_src_get_dimensions( $image_src, $image_meta, $attachment_id =
|
||||
// Is it a full size image?
|
||||
if (
|
||||
isset( $image_meta['file'] ) &&
|
||||
strpos( $image_src, $image_meta['file'] ) !== false
|
||||
strpos( $image_src, wp_basename( $image_meta['file'] ) ) !== false
|
||||
) {
|
||||
$dimensions = array(
|
||||
(int) $image_meta['width'],
|
||||
|
||||
Reference in New Issue
Block a user