Document Gallery - Version 1.3.1

Version Description

  • Bug Fix: This resolves a bug introduced in version 1.3. (Thanks to JKChad for pointing this out!)
Download this release

Release Info

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

Code changes from version 1.3 to 1.3.1

Files changed (2) hide show
  1. document-gallery.php +5 -7
  2. readme.txt +9 -4
document-gallery.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Document Gallery
4
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
5
- Version: 1.3
6
  Author: Dan Rossiter
7
  Author URI: http://danrossiter.org/
8
  License: GPL2
@@ -33,17 +33,15 @@ function dg_get_attachment_icons($atts) {
33
 
34
 
35
  // ATTRIBUTE VALIDATION
36
- $descriptions = strtolower($descriptions) == "false" ? FALSE : TRUE;
37
-
38
  $order = strtoupper( $order );
39
  if($order != 'ASC' && $order != 'DEC')
40
  $errs[] = "The order attribute must be either ASC or DEC. You entered $order.";
41
 
42
- $attachment_pg = strtolower($attachment_pg) == "false" ? FALSE : TRUE;
43
-
44
- $images = strtolower($images) == "false" ? FALSE : TRUE;
45
 
46
- if( strtolower($ids) == "false" ){ $ids = FALSE; }
 
 
47
 
48
  // http://www.youtube.com/watch?v=ClnSMCdw6E8
49
  if( $errs ) return implode(' ', $errs);
2
  /*
3
  Plugin Name: Document Gallery
4
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
5
+ Version: 1.3.1
6
  Author: Dan Rossiter
7
  Author URI: http://danrossiter.org/
8
  License: GPL2
33
 
34
 
35
  // ATTRIBUTE VALIDATION
 
 
36
  $order = strtoupper( $order );
37
  if($order != 'ASC' && $order != 'DEC')
38
  $errs[] = "The order attribute must be either ASC or DEC. You entered $order.";
39
 
40
+ if( strtolower($ids) == "false" ) $ids = FALSE;
 
 
41
 
42
+ $descriptions = !$descriptions || strtolower($descriptions) == "false" ? FALSE : TRUE;
43
+ $attachment_pg = !$attachment_pg || strtolower($attachment_pg) == "false" ? FALSE : TRUE;
44
+ $images = !$images || strtolower($images) == "false" ? FALSE : TRUE;
45
 
46
  // http://www.youtube.com/watch?v=ClnSMCdw6E8
47
  if( $errs ) return implode(' ', $errs);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: dan.rossiter
3
  Tags: attachments, icons, documents, gallery, ms office, doc, ppt, xls, docx, pptx, xlsx, pdf,openoffice
4
  Requires at least: 2.6
5
  Tested up to: 3.5.1
6
- Stable tag: 1.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -47,9 +47,9 @@ ids=[false/comma-separated list of id #s]]`
47
 
48
  **Default Values**
49
 
50
- By default, document gallery will use `descriptions=false`,
51
- `orderby=menu_order`, `order=ASC` , `attachment_pg=false`, `images=false`, and
52
- `ids=false` if you do not specify otherwise.
53
 
54
  **Descriptions Option**
55
 
@@ -195,6 +195,11 @@ Note that the display inherits styling from your active theme.
195
  forum](http://wordpress.org/support/plugin/document-gallery) if you have
196
  ideas)!
197
 
 
 
 
 
 
198
  = 1.3 =
199
 
200
  * **New Feature:** It is now possible to filter the HTML produced to represent
3
  Tags: attachments, icons, documents, gallery, ms office, doc, ppt, xls, docx, pptx, xlsx, pdf,openoffice
4
  Requires at least: 2.6
5
  Tested up to: 3.5.1
6
+ Stable tag: 1.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
47
 
48
  **Default Values**
49
 
50
+ By default, document gallery will use `descriptions=false`
51
+ , `orderby=menu_order`, `order=ASC` , `attachment_pg=false`, `images=false`
52
+ , and `ids=false` if you do not specify otherwise.
53
 
54
  **Descriptions Option**
55
 
195
  forum](http://wordpress.org/support/plugin/document-gallery) if you have
196
  ideas)!
197
 
198
+ = 1.3.1 =
199
+
200
+ * **Bug Fix:** This resolves a bug introduced in version `1.3`. (Thanks to JKChad
201
+ for pointing this out!)
202
+
203
  = 1.3 =
204
 
205
  * **New Feature:** It is now possible to filter the HTML produced to represent