[wp-trac] [WordPress Trac] #57760: add 'pre_wp_get_attachment_url' filter
WordPress Trac
noreply at wordpress.org
Fri Feb 17 18:16:16 UTC 2023
#57760: add 'pre_wp_get_attachment_url' filter
-------------------------+-----------------------------
Reporter: fodisery | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57760>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list