• Resolved rcain

    (@rcain)


    Hi,

    Great plugin. Thanks. (something like this should really be included in wp core i think).

    One small improvement i needed to make:

    file: wp-gallery-custom-links.php
    func: apply_filter_attachment_fields_to_edit
    around lines: 88-100

    – i added an additional EXPLICIT option for ‘_self’ – so you can now choose: ‘Nothing’, ‘_self’ or ‘_blank’ for the target option.

    I did this because I am using your plugin to augment functionality of the istope-gallery plugin & the way you had implemented meant that selection of ‘_self’ as link target resulted in that option value iteself being removed from wordpress db (that is the default wp behaviour).

    With my mod however, I can now properly detect and operate on the target option set by the admin using your plugin, via other plugins, (and without causing any regression problems).

    I would be very happy to share my code mod with you (FOC) in the hope other useres might also find it helpful.

    Would you like me to email it to you, else I can pop it up on pastbin?

    http://wordpress.org/plugins/wp-gallery-custom-links/

Viewing 1 replies (of 1 total)
  • Originally, the plugin did not set a target on all links, only _blank when new window was set to true. Then a situation came up (you may have seen my rambling comment if you were looking at the code) where a user had a theme with a custom gallery that opened all images in a new window by default, which made the plugin appear “broken” because “same window” (i.e. don’t change the target) was still opening in a new window. I’m not sure how many themes out there are like that, but I modified the plugin so instead of not touching the target by default, it set it to open in the same window by default via _self. If you did read my rambling code comment, you are probably aware of how iffy I felt about doing so, but the user’s alternative in that situation was to hack their theme’s code, which isn’t ideal, so I was trying to solve it for them (and possibly other users) nicely, while also worrying about backwards-compatibility for existing users.

    Long story short, I may work in a “Theme Default” or “Nothing” option like you suggest (and like it was before) to give users an option to leave it untouched in a future release. Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘small mod so it plays nice with other gallery plugins (eg: isotope gallery)’ is closed to new replies.