Changeset 48454 for trunk/src/wp-includes/media.php
- Timestamp:
- 07/12/2020 09:18:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r48430 r48454 1523 1523 if ( strrpos( $image_location, $image_meta['file'] ) === strlen( $image_location ) - strlen( $image_meta['file'] ) ) { 1524 1524 $match = true; 1525 } else if ( ! empty( $image_meta['sizes'] ) ){1525 } else { 1526 1526 // Retrieve the uploads sub-directory from the full size image. 1527 1527 $dirname = _wp_get_attachment_relative_path( $image_meta['file'] ); … … 1531 1531 } 1532 1532 1533 foreach ( $image_meta['sizes'] as $image_size_data) {1534 $relative_path = $dirname . $image_ size_data['file'];1533 if ( ! empty( $image_meta['original_image'] ) ) { 1534 $relative_path = $dirname . $image_meta['original_image']; 1535 1535 1536 1536 if ( strrpos( $image_location, $relative_path ) === strlen( $image_location ) - strlen( $relative_path ) ) { 1537 1537 $match = true; 1538 break; 1538 } 1539 } 1540 1541 if ( ! $match && ! empty( $image_meta['sizes'] ) ) { 1542 foreach ( $image_meta['sizes'] as $image_size_data ) { 1543 $relative_path = $dirname . $image_size_data['file']; 1544 1545 if ( strrpos( $image_location, $relative_path ) === strlen( $image_location ) - strlen( $relative_path ) ) { 1546 $match = true; 1547 break; 1548 } 1539 1549 } 1540 1550 }
Note: See TracChangeset
for help on using the changeset viewer.