Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6086 closed enhancement (fixed)

New functions for attachment image display

Reported by: tellyworth Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:


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)

attachment-images-r7145-3.patch (5.8 KB) - added by tellyworth 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @tellyworth
13 years ago

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.

#2 @matt
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7149]) New functions for attachment image display, fixes #6086. Hat tip: tellyworth.

#3 @AaronCampbell
13 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.

Note: See TracTickets for help on using tickets.