#50722 closed enhancement (fixed)
Change params on wp_image_file_matches_image_meta function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Media | Keywords: | has-patch has-unit-tests |
Focuses: | rest-api | Cc: |
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.
5 years ago
#1
- Keywords has-unit-tests added
#3
@
5 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
@
5 years ago
- Owner set to SergeyBiryukov
- Status changed from new to 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()
SergeyBiryukov commented on PR #423:
5 years ago
#6
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/50722