Skip to content
Commit 8ddf29d6 authored by Andrew Ozz's avatar Andrew Ozz
Browse files

Media:

- Introduce `wp_image_file_matches_image_meta()` utility function to check whether the image meta (retrieved by attachment ID) matches an image path or URI. A mismatch may happen in some cases, for example after the posts have been exported from one website and imported in another.
- Add unit tests for the new function.
- Improve `wp_image_src_get_dimensions()` a bit and use the new function to prevent these edge cases.

Fixes #50543.
Built from https://develop.svn.wordpress.org/trunk@48329


git-svn-id: https://core.svn.wordpress.org/trunk@48098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 6b34e04f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment