#18178 closed enhancement (fixed)
Add "none" option to $attr['link'] for [gallery] shortcode
| Reported by: | chipbennett | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Gallery | Version: | 3.2.1 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
Description
Currently, the [gallery] shortcode only supports output of linked images. By default, each gallery image links to the attachment page, or directly to the file, if link="file" is passed to the shortcode. Both cases use wp_get_attachment_image_link().
Attached patch adds support for link="none", enabling the gallery images to be output as flat image files, rather than linked, via wp_get_attachment_image().
Attachments (5)
Change History (19)
#3
@
14 years ago
+1 Need it for the next version of my photography site, where I use the gallery shortcode to display full size images.
#6
@
14 years ago
Just to verify that Chip's patch still works perfectly over a year later. I got some error about line numbers not matching up any more (I use git) and so I just created a new version of the same diff.... don't know if it is needed or not. Ultimately, Chip's approach works great and I think would be worth including in the next update.
#8
@
14 years ago
- Milestone Awaiting Review → 3.6
This seems harmless - I tidy'd up the code a lil bit, but it's all based on your patches. wp_get_attachement_* funcs are documented themselves, so I don't think we need to go into great detail about what is going down here
#9
@
14 years ago
Please let's not forget that galleries in feeds are handled by a slightly different code path and may also need some attention. See #22101.
#11
@
13 years ago
18178.2.diff cleans up the code a bit more and updates to apply cleanly.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Add
link="none"support to[gallery]shortcode, to enable output of flat/unlinked images