WordPress.org

Ready to get started?Download WordPress

Forums

Slideshow Gallery
BUGFIX: Exclusions not working when loading images attached to a post (1 post)

  1. timnovinger
    Member
    Posted 2 years ago #

    On line 201 of slideshow-gallery.php the in_array() statement is looking for the $a iterator variable in the exclusion array instead of the $id. It seems to be searching for the array key instead of the array value. This fails silently on my server running PHP 5.3.5 and WP 3.4.1.

    I'm not sure what the $a iterator variable is doing in this instance - it looks completely unnecessary so it is possible that you may be able to simply rip it out.

    If lines 201 − 203 are changed to the code below it works fine.

    if (in_array($id, $exclude)) {
      unset($attachments[$id]);
    }

    http://wordpress.org/extend/plugins/slideshow-gallery/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags