#6086 closed enhancement (fixed)
New functions for attachment image display
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.5 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch |
| Focuses: | 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.
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.