Document Gallery - Version 2.0.9

Version Description

  • Bug Fix: The order attribute was documented and implemented as being ASC or DEC, but the latter should actually have been DESC. Documentation and implementation for this option has been corrected. Thanks again to demur for catching this!
Download this release

Release Info

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

Code changes from version 2.0.8 to 2.0.9

README.txt CHANGED
@@ -4,7 +4,7 @@ Tags: attachments, thumbnail, documents, gallery, MS office, pdf
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 3.6
6
  Tested up to: 3.9
7
- Stable tag: 2.0.8
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -50,7 +50,7 @@ customize behavior with various attributes, seen below:
50
  `[dg [fancy=true] [attachment_pg=<true/false>]
51
  [category/custom_taxon_name=<**comma-separated list of taxon values**> [relation=<AND/OR>]]
52
  [descriptions=<true/false>] [ids=<**comma-separated list of ID #s**>]
53
- [images=<true/false>] [localpost=<true/false>] [order=<ASC/DEC>] [orderby=<**see below**>]]`
54
 
55
  Though the shortcode above may seem far from "short," none of the attributes are
56
  required and most users will find that the plugin meets your needs "out of the box"
@@ -238,7 +238,7 @@ is perfectly alright.
238
  == Frequently Asked Questions ==
239
 
240
 
241
- = Q: Why is [insert thumbnail generation method] enabled on one of my WordPress
242
  installs, but not on another one? =
243
 
244
  A: Document Gallery works very hard behind the scenes to ensure that it enables
@@ -298,6 +298,12 @@ Note that the display inherits styling from your active theme.
298
  forum](http://wordpress.org/support/plugin/document-gallery) if you have
299
  ideas)!
300
 
 
 
 
 
 
 
301
  = 2.0.8 =
302
  * **Enhancement:** Ghostscript will now handle PS and EPS files if enabled.
303
  * **Bug Fix:** There were a couple of issues in how the `ids` attribute was being
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 3.6
6
  Tested up to: 3.9
7
+ Stable tag: 2.0.9
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
50
  `[dg [fancy=true] [attachment_pg=<true/false>]
51
  [category/custom_taxon_name=<**comma-separated list of taxon values**> [relation=<AND/OR>]]
52
  [descriptions=<true/false>] [ids=<**comma-separated list of ID #s**>]
53
+ [images=<true/false>] [localpost=<true/false>] [order=<ASC/DESC>] [orderby=<**see below**>]]`
54
 
55
  Though the shortcode above may seem far from "short," none of the attributes are
56
  required and most users will find that the plugin meets your needs "out of the box"
238
  == Frequently Asked Questions ==
239
 
240
 
241
+ = Q: Why is insert thumbnail generation method enabled on one of my WordPress
242
  installs, but not on another one? =
243
 
244
  A: Document Gallery works very hard behind the scenes to ensure that it enables
298
  forum](http://wordpress.org/support/plugin/document-gallery) if you have
299
  ideas)!
300
 
301
+ = 2.0.9 =
302
+ * **Bug Fix:** The `order` attribute was documented and implemented as being `ASC`
303
+ or `DEC`, but the latter should actually have been `DESC`. Documentation and
304
+ implementation for this option has been corrected. Thanks again to
305
+ [demur](http://wordpress.org/support/profile/demur) for catching this!
306
+
307
  = 2.0.8 =
308
  * **Enhancement:** Ghostscript will now handle PS and EPS files if enabled.
309
  * **Bug Fix:** There were a couple of issues in how the `ids` attribute was being
admin/class-admin.php CHANGED
@@ -140,7 +140,7 @@ class DG_Admin {
140
  'value' => esc_attr($defaults['order']),
141
  'options' => DG_Gallery::getOrderOptions(),
142
  'option_name' => DG_OPTION_NAME,
143
- 'description' => __('Ascending or decending sorting of documents', 'document-gallery')
144
  ));
145
 
146
  add_settings_field(
140
  'value' => esc_attr($defaults['order']),
141
  'options' => DG_Gallery::getOrderOptions(),
142
  'option_name' => DG_OPTION_NAME,
143
+ 'description' => __('Ascending or descending sorting of documents', 'document-gallery')
144
  ));
145
 
146
  add_settings_field(
document-gallery.php CHANGED
@@ -5,7 +5,7 @@ defined('WPINC') OR exit;
5
  Plugin Name: Document Gallery
6
  Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
7
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
8
- Version: 2.0.8
9
  Author: Dan Rossiter
10
  Author URI: http://danrossiter.org/
11
  License: GPLv2
@@ -13,7 +13,7 @@ defined('WPINC') OR exit;
13
  */
14
 
15
  // define helper paths & URLs
16
- define('DG_VERSION', '2.0.8');
17
  define('DG_URL', plugin_dir_url(__FILE__));
18
  define('DG_PATH', plugin_dir_path(__FILE__));
19
  define('DG_WPINC_PATH', ABSPATH . WPINC . '/');
5
  Plugin Name: Document Gallery
6
  Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
7
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
8
+ Version: 2.0.9
9
  Author: Dan Rossiter
10
  Author URI: http://danrossiter.org/
11
  License: GPLv2
13
  */
14
 
15
  // define helper paths & URLs
16
+ define('DG_VERSION', '2.0.9');
17
  define('DG_URL', plugin_dir_url(__FILE__));
18
  define('DG_PATH', plugin_dir_path(__FILE__));
19
  define('DG_WPINC_PATH', ABSPATH . WPINC . '/');
inc/class-gallery.php CHANGED
@@ -311,7 +311,7 @@ class DG_Gallery {
311
 
312
  $order = strtoupper($value);
313
  if(!in_array($order, self::getOrderOptions())) {
314
- $err = sprintf(self::$binary_err, 'order', 'ASC', 'DEC', $value);
315
  } else {
316
  $ret = $order;
317
  }
@@ -320,7 +320,7 @@ class DG_Gallery {
320
  }
321
 
322
  public static function getOrderOptions() {
323
- return array('ASC', 'DEC');
324
  }
325
 
326
  private static function sanitizeOrderby($value, &$err) {
311
 
312
  $order = strtoupper($value);
313
  if(!in_array($order, self::getOrderOptions())) {
314
+ $err = sprintf(self::$binary_err, 'order', 'ASC', 'DESC', $value);
315
  } else {
316
  $ret = $order;
317
  }
320
  }
321
 
322
  public static function getOrderOptions() {
323
+ return array('ASC', 'DESC');
324
  }
325
 
326
  private static function sanitizeOrderby($value, &$err) {
languages/document-gallery-es_ES.mo CHANGED
Binary file
languages/document-gallery-es_ES.po CHANGED
@@ -8,7 +8,7 @@ msgstr ""
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-04-14 18:48-0600\n"
12
  "Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
  "X-Generator: Poedit 1.6.4\n"
@@ -65,8 +65,8 @@ msgid "Only look for attachments in post where [dg] is used"
65
  msgstr "Buscar sólo los archivos adjuntos en correos donde se utiliza [dg]"
66
 
67
  #: admin/class-admin.php:152
68
- msgid "Ascending or decending sorting of documents"
69
- msgstr "Clasificación de documentosascendente o descendente"
70
 
71
  #: admin/class-admin.php:165
72
  msgid "Which field to order documents by"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-04-20 21:59-0600\n"
12
  "Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
  "X-Generator: Poedit 1.6.4\n"
65
  msgstr "Buscar sólo los archivos adjuntos en correos donde se utiliza [dg]"
66
 
67
  #: admin/class-admin.php:152
68
+ msgid "Ascending or descending sorting of documents"
69
+ msgstr "Clasificación de documentos ascendente o descendente"
70
 
71
  #: admin/class-admin.php:165
72
  msgid "Which field to order documents by"
languages/document-gallery.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Document Gallery package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Document Gallery 2.0.7\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
7
- "POT-Creation-Date: 2014-04-14 23:48:01+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -20,7 +20,7 @@ msgstr ""
20
  msgid "Document Gallery Settings"
21
  msgstr ""
22
 
23
- #. #-#-#-#-# plugin.pot (Document Gallery 2.0.7) #-#-#-#-#
24
  #. Plugin Name of the plugin/theme
25
  #: admin/class-admin.php:38
26
  msgid "Document Gallery"
@@ -63,7 +63,7 @@ msgid "Only look for attachments in post where [dg] is used"
63
  msgstr ""
64
 
65
  #: admin/class-admin.php:143
66
- msgid "Ascending or decending sorting of documents"
67
  msgstr ""
68
 
69
  #: admin/class-admin.php:156
2
  # This file is distributed under the same license as the Document Gallery package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Document Gallery 2.0.9\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
7
+ "POT-Creation-Date: 2014-04-21 02:57:10+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
20
  msgid "Document Gallery Settings"
21
  msgstr ""
22
 
23
+ #. #-#-#-#-# plugin.pot (Document Gallery 2.0.9) #-#-#-#-#
24
  #. Plugin Name of the plugin/theme
25
  #: admin/class-admin.php:38
26
  msgid "Document Gallery"
63
  msgstr ""
64
 
65
  #: admin/class-admin.php:143
66
+ msgid "Ascending or descending sorting of documents"
67
  msgstr ""
68
 
69
  #: admin/class-admin.php:156