Support » Plugin: Eazyest Gallery » Thumbnails output: improve Thumbnail click set to -nothing- image option

  • Resolved klihelp



    Don’t wrap images into < a /> if the Thumbnail-click image option set to Nothing. This will break the links for search engines or browsers without javascript.

    Two more image options could be useful to get a clean output
    – no link on thumbnails. This will look nice with a medium/large thumbnail size.
    – no icontag wrap

    <ul class="small-block-grid-2"> <!-- gallery_div -->
    <li> <!-- <img src=thumbnail> --></li>
    <li> <!-- <img src=thumbnail> --></li>

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Marcel Brinkkemper


    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);
    Plugin Author Marcel Brinkkemper


    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.

    Plugin Author Marcel Brinkkemper


    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.

    Plugin Author Marcel Brinkkemper


    Yeah, but this is NOT Lazyest Gallery.
    Sorry, but I am not going to change this implementation of the thumbnails gallery.


    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:

    Plugin Author Marcel Brinkkemper


    Yes, that would make live quite easier.
    I’ll use it in 0.2.0

    Plugin Author Marcel Brinkkemper


    After a second read: this patch is not set to ‘commit’ yet. Let’s wait until it is really implemented.

    Plugin Author Marcel Brinkkemper


    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:

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Thumbnails output: improve Thumbnail click set to -nothing- image option’ is closed to new replies.