Eazyest Gallery uses the WordPress gallery output which wraps images in link anchors.
The plugin overwrites the output for the[gallery] shortcode.
There is an extra option for captions. So you could have an extra option for image-anchor .
Line 228 in class-eazyest-shortcodes.php:
// Eazyest_Shortcodes::gallery_shortcode()
foreach ( $attachments as $id => $attachment ) {
if ( isset($attr['nolinkwrap']) && $attr['nolinkwrap'] ){ // just image
$attr_image = array(
'src' => $attachment->guid,
'class' => "",
'alt' => wptexturize($attachment->post_excerpt)
);
$link = wp_get_attachment_image( $attachment->ID, $size, false, $attr_image );
} else { // as it was, output the link image
$link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);
}
Actually, it doesn’t
The plugin only overwrites the gallery output when you have extra fields and you have selected to show descriptions in thumbnail view.
However, this has not been implemented yet, so this part of the code is never called.
There is no full control how to separate Eazyest Gallery output from gallery output for other pages.
eg. How it’s possible to change Blog galleries without affecting Eazyest Gallery pages?
– In case the theme overwrites the [gallery] output, than will break the plugin options for future plugin versions.
if you add a filter, you can always check if you are showing a gallery folder instead of a post.
Interestingly Lazyest Gallery did have a different gallery view without affecting the normal [gallery] output and [gallery] shortcode theme settings.
The logic is the same if the extra fields options are set, then the plugin overwrites the [gallery] shortcode …
In this case why there is a eazyest_gallery filter?
Line 133 in class-eazyest-shortcodes.php:
// Eazyest_Shortcodes::gallery_shortcode()
// Allow plugins/themes to override the default gallery template.
$output = apply_filters( 'eazyest_gallery', '', $attr );
if ( $output != '' )
return $output;
>>> The plugin only overwrites the gallery output when you have extra fields and you have selected to show descriptions in thumbnail view.
Yeah, but this is NOT Lazyest Gallery.
Sorry, but I am not going to change this implementation of the thumbnails gallery.
Ok.
In this case we have to overwrite the [gallery] output,
and copy the output code from the plugin function to support the extra fields option … and hopefully this will not break future plugin options.
Hope in the future the plugin will optionally support it’s own markup for Eazyest Gallery pages.
ps: For others who have the same problem:
This is not resolved by the core plugin, need a workaround in theme functions.
The good thing is that this will be supported by WordPress 3.6:
http://core.trac.wordpress.org/ticket/18178
Yes, that would make live quite easier.
I’ll use it in 0.2.0
After a second read: this patch is not set to ‘commit’ yet. Let’s wait until it is really implemented.
Fixed in trunk by using preg_replace() on 'wp_get_attachment_link‘ filter
The related ticket now is resolved and will be part of the next WordPress.
Add “none” option to $attr[‘link’] for [gallery] shortcode:
http://core.trac.wordpress.org/ticket/18178