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 🙂
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.
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?
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
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/.
Thanks. I can confirm this is working.
Super! Don’t hesitate to let a little review, that will help 🙂
Niiiice 🙂 Thanks a lot !!!