Document Gallery - Version 1.0.4

Version Description

  • Bug Fix: Removed extra div at bottom when number of documents is evenly divisible by 4. (Thanks, joero4ri!)
Download this release

Release Info

Developer dan.rossiter
Plugin Icon 128x128 Document Gallery
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

Files changed (2) hide show
  1. document-gallery.php +3 -3
  2. readme.txt +5 -1
document-gallery.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Document Gallery
4
  Description: Display non-images in gallery format on page.
5
- Version: 1.0.3
6
  Author: Dan Rossiter
7
  Author URI: http://danrossiter.org/
8
  License: GPL2
@@ -65,7 +65,7 @@ function dg_get_attachment_icons($atts) {
65
  // close #document-icon-wrapper
66
  if($descriptions) {
67
  $attachment_str[] = '</table>';
68
- } else {
69
  $attachment_str[] = '</div>';
70
  }
71
 
@@ -74,7 +74,7 @@ function dg_get_attachment_icons($atts) {
74
  return $attachment_str;
75
  } // end if attachments
76
 
77
- return '<!-- Document Gallery: No attachments to display. -->'.PHP_EOL;
78
  }
79
  add_shortcode('document gallery', 'dg_get_attachment_icons');
80
  add_shortcode('dg', 'dg_get_attachment_icons');
2
  /*
3
  Plugin Name: Document Gallery
4
  Description: Display non-images in gallery format on page.
5
+ Version: 1.0.4
6
  Author: Dan Rossiter
7
  Author URI: http://danrossiter.org/
8
  License: GPL2
65
  // close #document-icon-wrapper
66
  if($descriptions) {
67
  $attachment_str[] = '</table>';
68
+ } elseif($count % 4 != 0) {
69
  $attachment_str[] = '</div>';
70
  }
71
 
74
  return $attachment_str;
75
  } // end if attachments
76
 
77
+ return PHP_EOL.'<!-- Document Gallery: No attachments to display. -->'.PHP_EOL;
78
  }
79
  add_shortcode('document gallery', 'dg_get_attachment_icons');
80
  add_shortcode('dg', 'dg_get_attachment_icons');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: dan.rossiter
3
  Tags: attachments, icons, documents, gallery
4
  Requires at least: 2.6
5
  Tested up to: 3.5
6
- Stable tag: 1.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -65,6 +65,10 @@ code wherever you would like it to appear: `<?php echo do_shortcode('[dg]'); ?>`
65
  * Support for adding your own filetypes/icons.
66
  * Whatever else **you** would like (post on the [support forum](http://wordpress.org/support/plugin/document-gallery) if you have ideas)!
67
 
 
 
 
 
68
  = 1.0.3 =
69
 
70
  * **Bug Fix:** Resolved issue with detecting plugin directory. (Thanks, Brigitte!)
3
  Tags: attachments, icons, documents, gallery
4
  Requires at least: 2.6
5
  Tested up to: 3.5
6
+ Stable tag: 1.0.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
65
  * Support for adding your own filetypes/icons.
66
  * Whatever else **you** would like (post on the [support forum](http://wordpress.org/support/plugin/document-gallery) if you have ideas)!
67
 
68
+ = 1.0.4 =
69
+
70
+ * **Bug Fix:** Removed extra `div` at bottom when number of documents is evenly divisible by 4. (Thanks, joero4ri!)
71
+
72
  = 1.0.3 =
73
 
74
  * **Bug Fix:** Resolved issue with detecting plugin directory. (Thanks, Brigitte!)