Opened 19 months ago
Last modified 17 months ago
#57760 new enhancement
add 'pre_wp_get_attachment_url' filter
Reported by: | fodisery | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
We are making plugin for featured image using external url.
If user gt featured image url via wp_get_attachment_url()
there is no way for us to hook because wp_get_attachment_url
hook will never called if the post is not 'attachment'. The only way for us to make it work via creating fake attachment which is complicated.
pre_wp_get_attachment_url
filter will be very helpful in this case.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Real life problem:
https://wordpress.org/plugins/featured-image-from-url/
They solve this by creating fake attachment for each featured image, which waste of space.
https://wordpress.org/plugins/featured-image-by-url/
They stated plugin wont work if theme uses 'wp_get_attachment_url' to get featured image url