• Resolved summatix

    (@summatix)


    When an image that is used in a gallery is used outside of a gallery, it appears that the image is still being linked. There’s no way to remove the link from the image on the page without also removing the link from the gallery.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    I might be able to add some kind of option for this.

    Could you edit the plugin? In the file mgcl_core.php, you will find this:

    //$classes = apply_filters( 'gallery_custom_links_classes', array( '.entry-content', '.gallery', '.wp-block-gallery' ) );

    Simply… uncomment it, this way:

    $classes = apply_filters( 'gallery_custom_links_classes', array( '.entry-content', '.gallery', '.wp-block-gallery' ) );

    The plugin will now only work on those specific classes. If your gallery system is using a different class, you will need to edit that array of classes. Please let me know if it helps ??

    Thread Starter summatix

    (@summatix)

    Thanks. I had to remove the '.entry-content' class:

    $classes = apply_filters( 'gallery_custom_links_classes', array( '.gallery', '.wp-block-gallery' ) );

    This seems to be working for me.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Indeed, yes, this one has to be removed in your case ?? Maybe I should add an option for this, called “CSS Filter” maybe? If it’s empty, it looks everywhere, otherwise, it uses that string of classes you used. What do you think?

    Thread Starter summatix

    (@summatix)

    Yes, a filter could work. I would prefer it to just look in certain classes, it makes it more predictable. I only really need it to look inside .gallery since that’s where I have gallery images.

    Hi ?? did you do this options ?? ??
    I’m worried about modify the plugin’s code … you’ll override it with futurs updates ??

    thankkkss

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi guys,

    A new version is about to be pushed. Have a look at the new documentation, especially the “Allow it only on specific classes” section here: https://meowapps.com/plugin/gallery-custom-links/.

    Thread Starter summatix

    (@summatix)

    Thanks. I can confirm this is working.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Super! Don’t hesitate to let a little review, that will help ??

    Niiiice ?? Thanks a lot !!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Image is linked outside of gallery’ is closed to new replies.