"exclude" directive (still) not working

Hi,

Installed fresh version 1.2.3.2 of the plugin on WordPress 3.4.2, tried using 'exclude' directive in the shortcode, which didn't work. Went on to fish around for a solution, found a fix on this page. Tested and confirmed that it works.

Replace this:

<pre lang="php">
$a = 0;
foreach ($attachments as $id => $attachment) {
  $a++;
  if (in_array($a, $exclude)) {
    unset($attachments[$id]);
  }
}
</pre>

With this:

<pre lang="php">
foreach ($attachments as $id => $attachment) {
  if (in_array($id, $exclude)) {
    unset($attachments[$id]);
  }
}
</pre>

Any reason why hasn't this been fixed up to now? The guy reported it broken in version 1.0.5.

Thanks.

Comments

Sign In or Register to comment.