#50722 closed enhancement (fixed)
Change params on wp_image_file_matches_image_meta function
| Reported by: | spacedmonkey | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.5 |
| Component: | Media | Version: | 5.5 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | rest-api |
Description
Change params on wp_image_file_matches_image_meta function for better reusability and more context to the filter.
Change History (6)
This ticket was mentioned in PR #423 on WordPress/wordpress-develop by spacedmonkey.
6 years ago
#1
- Keywords has-unit-tests added
#3
@
6 years ago
The filter wp_image_file_matches_image_meta being passed the $attachment_id is important for plugins like jetpack that have custom image urls.
#4
@
6 years ago
- Owner set to
- Status new → reviewing
If the goal is to provide pass the $attachment_id parameter to the wp_image_file_matches_image_meta filter, it seems like the best way forward would be to pass it along with $image_meta to the function.
That would be consistent with a few existing functions:
wp_calculate_image_srcset()wp_calculate_image_sizes()wp_image_add_srcset_and_sizes()
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/50722