mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 13:38:37 +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. Built from https://develop.svn.wordpress.org/trunk@50144 git-svn-id: http://core.svn.wordpress.org/trunk@49823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06c4b334fa
commit
373ee89c83
@ -1604,7 +1604,7 @@ function wp_image_src_get_dimensions( $image_src, $image_meta, $attachment_id =
|
|||||||
// Is it a full size image?
|
// Is it a full size image?
|
||||||
if (
|
if (
|
||||||
isset( $image_meta['file'] ) &&
|
isset( $image_meta['file'] ) &&
|
||||||
strpos( $image_src, $image_meta['file'] ) !== false
|
strpos( $image_src, wp_basename( $image_meta['file'] ) ) !== false
|
||||||
) {
|
) {
|
||||||
$dimensions = array(
|
$dimensions = array(
|
||||||
(int) $image_meta['width'],
|
(int) $image_meta['width'],
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.7-alpha-50143';
|
$wp_version = '5.7-alpha-50144';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user