[wp-trac] [WordPress Trac] #29237: Add Link Size Parameter to Gallery Shortcode
WordPress Trac
noreply at wordpress.org
Tue Oct 13 23:29:15 UTC 2015
#29237: Add Link Size Parameter to Gallery Shortcode
--------------------------------------+------------------------------
Reporter: cliffseal | Owner: DrewAPicture
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Gallery | Version: 3.9.2
Severity: normal | Resolution:
Keywords: dev-feedback needs-patch | Focuses:
--------------------------------------+------------------------------
Comment (by DrewAPicture):
Replying to [comment:9 cliffseal]:
> @DrewAPicture That seems doable. Would we still create an additional UI
element to choose media size, or would image choices be integrated into
the existing dropdown?
This is kind of the sticking point. There's ''already'' an option to
choose an image size for the gallery display, and adding a second option
while trying to clearly express the difference would be pretty likely to
cause confusion.
In reality, this seems like a cool ability, but also pretty edge. My
recommendation would be initially added support only for the attribute to
accept an image size and handle outputting the correct links.
Of course, the attributes are also already filterable via the
[https://developer.wordpress.org/reference/hooks/shortcode_atts_shortcode/
shortcode_atts_gallery] hook, so it could be done programmatically as
well.
If a plugin or theme wanted to extend that functionality into the Gallery
UI, the
[https://developer.wordpress.org/reference/hooks/print_media_templates/
print_media_template] hook makes it possible to add a Backbone template.
Jetpack uses that hook to add a "Type" drop-down for their Carousel
module, for instance.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29237#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list