WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Galleries
[resolved] Fixed a bug in the plugin (1 post)

  1. eyalgursoy
    Member
    Posted 3 years ago #

    If you have many images in the post you are likely to see this issue.
    I had a case when:
    Gallery 1 - image 1 - id=10
    Gallery 2 - image 2 - id=110

    But when I've opened the Gallery setup window from Gallery 1 both files were marked as selected.
    this was caused due to the use of indexOf() JS function.

    I've changed multiple-galleries.js as follow:

    line 6:
    var $include = '', $is_update = false, $is_checked, $include_arr;

    line 36 - added:
    $include_arr = $include.split(", ");

    replaced:
    if ($include != null && $include.indexOf($imgid) != -1)
    with:
    if ($include_arr != null && jQuery.inArray($imgid, $include_arr) != -1)

    And that's it - problem solved!

    Hope you will fix this in the next release.

    Thanks,
    eyalgursoy
    eyalgu.wordpress.com

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic