#6354 closed defect (bug) (worksforme)
New media/attachment template tags need some love
Reported by: | westi | Owned by: | westi |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | blocker | Version: | 2.5 |
Component: | Template | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
As photomatt said on IRC some of the new template tags for media/attachments don't have the standard configurablty or sensible names that our other template tags have.
This is a blocker for 2.5
< photomatt_hou> like wp_get_attachment_link, which doesn't return a link
< photomatt_hou> previous_image_link which doesn't support anything the other next/prev functions do
Change History (6)
#4
@
17 years ago
Indeed most get_*_link functions return just a url.
Also at present wp_get_attachment_link returns a link with either text or image content depending on whether or not the linked attachment is an image with no configurability
#5
@
17 years ago
- Resolution set to worksforme
- Status changed from new to closed
The function names are terrible but not all new with 2.5:
wp_get_attachment_url returns the file URL
get_attachment_link returns the attachment permalink URL
wp_get_attachment_link returns an A tag with the option to use the file URL or the permalink.
If you want a text link to an image, use get_attachment_link.
Silly question, but I'll ask anyway.. How is
return "<a href='$url' title='$post_title'>$link_text</a>";
not a link?