#6086 closed enhancement (fixed)
New functions for attachment image display
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
This replaces some of the old code like get_attachment_icon(), get_attachment_innerHTML() and family with new image functions. The main visible change is that attachment permalink pages will now use the Medium size when displaying an image inline via prepend_attachment(). For developers, some new API functions replace the old ones for displaying attachment icons and images.
the_attachment_link() is still in place, with most of the rest replaced by wp_get_attachment_link() and wp_get_attachment_image(). I've left comments ahead of the functions I think ought to be deprecated but haven't otherwise touched them.
Kubrick still calls get_the_attachment_link() and relies on its quirky behaviour. I'm not sure whether it's better to change Kubrick, or alter get_the_attachment_link() so that it uses the new image functions.
Attachments (1)
Change History (4)
tellyworth
— 5 years ago
comment:1
tellyworth
— 5 years ago
comment:3
AaronCampbell
— 5 years ago
Just stating my opinion that it should be resized to $content_width or NOT RESIZED. What's the point of calling it "full size" and then not making it "full size"
If we want small medium large, lets call it that, but lets also keep full size.
Forgot to mention one other change I snuck in: when inserting a Full size image into the editor, it will be scaled down to fit the theme if $content_width is available, 500px wide otherwise.