Document Gallery - Version 4.2.4

Version Description

  • Tested Up To: Document Gallery has been tested in WP 4.6.
  • Bug Fix: Resolves bug in visual editor that would result in the gallery preview never loading in some circumstances.
Download this release

Release Info

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

Code changes from version 4.2.3 to 4.2.4

CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
  # Changelog
2
 
 
 
 
 
 
3
  ## 4.2.3
4
  * **Bug Fix:** Ghostscript thumbnail generation where the attachment name includes non-ASCII characters was failing
5
  on some server configurations. Kevin Hock identified the bug AND provided the fix. Gold star!
1
  # Changelog
2
 
3
+
4
+ ## 4.2.4
5
+ * **Tested Up To:** Document Gallery has been tested in WP 4.6.
6
+ * **Bug Fix:** Resolves bug in visual editor that would result in the gallery preview never loading in some circumstances.
7
+
8
  ## 4.2.3
9
  * **Bug Fix:** Ghostscript thumbnail generation where the attachment name includes non-ASCII characters was failing
10
  on some server configurations. Kevin Hock identified the bug AND provided the fix. Gold star!
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dan.rossiter, demur
3
  Tags: attachments, library, thumbnail, documents, gallery, word, 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: 4.1
6
- Tested up to: 4.5
7
- Stable tag: 4.2.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -422,6 +422,10 @@ To see a list of features planned for the future as well as to propose your own
422
  ideas for future Document Gallery development, take a look at our
423
  [issue tracker](https://github.com/thenadz/document-gallery/issues).
424
 
 
 
 
 
425
  = 4.2.3 =
426
  * **Bug Fix:** Ghostscript thumbnail generation where the attachment name includes non-ASCII characters was failing
427
  on some server configurations. Kevin Hock identified the bug AND provided the fix. Gold star!
3
  Tags: attachments, library, thumbnail, documents, gallery, word, 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: 4.1
6
+ Tested up to: 4.6
7
+ Stable tag: 4.2.4
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
422
  ideas for future Document Gallery development, take a look at our
423
  [issue tracker](https://github.com/thenadz/document-gallery/issues).
424
 
425
+ = 4.2.4 =
426
+ * **Tested Up To:** Document Gallery has been tested in WP 4.6.
427
+ * **Bug Fix:** Resolves bug in visual editor that would result in the gallery preview never loading in some circumstances.
428
+
429
  = 4.2.3 =
430
  * **Bug Fix:** Ghostscript thumbnail generation where the attachment name includes non-ASCII characters was failing
431
  on some server configurations. Kevin Hock identified the bug AND provided the fix. Gold star!
assets/js/gallery.js CHANGED
@@ -19,8 +19,10 @@
19
  */
20
  function sizeGalleryIcons(gallery) {
21
  (gallery || $('.document-gallery[data-icon-width]')).each(function() {
22
- var icon_width = $(this).data('icon-width') + '%';
23
- $(this).find('.document-icon').width(icon_width);
 
 
24
  });
25
  }
26
 
19
  */
20
  function sizeGalleryIcons(gallery) {
21
  (gallery || $('.document-gallery[data-icon-width]')).each(function() {
22
+ var icon_width = $(this).data('icon-width');
23
+ if (typeof icon_width !== 'undefined') {
24
+ $(this).find('.document-icon').width(icon_width + '%');
25
+ }
26
  });
27
  }
28
 
assets/js/gallery.min.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(b){function g(a){(a||b(".document-gallery[data-icon-width]")).each(function(){var a=b(this).data("icon-width")+"%";b(this).find(".document-icon").width(a)})}function m(){"undefined"!==typeof tinymce&&tinymce.PluginManager.add("dg",function(a,d){a.on("LoadContent dgUpdate undo",function(a){b(a.target.contentDocument).find(".wpview-type-dg > [data-shortcode]").each(function(){h(b.parseJSON(decodeURIComponent(b(this).data("shortcode"))),b(this))})})})}function n(){b("body").delegate(".dg-paginate-wrapper .paginate a",
2
  "click",function(a){var d=b(this).closest(".dg-paginate-wrapper"),e=d.data("shortcode");e.skip=0;var c=b(this).attr("href").split("#")[1].split("=");2<=c.length&&(e.skip=e.limit*(c.pop()-1));h(e,d);a.preventDefault()})}function k(){c=[];f=0;b(".document-gallery img[data-id]").each(function(){var a=b(this).data("id");-1===b.inArray(a,c)&&c.push(a)});l()}function h(a,d){"undefined"===typeof a.id&&(a.id=wp.media.dgDefaults.id);b.post(ajaxurl,{action:"dg_generate_gallery",atts:a},function(a){a=b(b.parseHTML(a));
3
  d.replaceWith(a);g(a);k()})}function l(){for(var a=[];f<c.length&&4!==a.length;f++)a.push(c[f]);0!=a.length&&b.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"dg_generate_icons",ids:a},success:p,error:function(a){console.error(a.responseText)}})}function p(a){for(var d in a)if(a.hasOwnProperty(d)){var c=b('.document-gallery img[data-id="'+d+'"]');c.removeAttr("data-id");(function(c,d){d.fadeOut("fast",function(){b(this).attr("src",a[c]);b(this).fadeIn("fast")})})(d,c)}l()}var c,f;b(document).ready(function(){g();
4
  k();m();n()})})(jQuery);
1
+ (function(b){function g(a){(a||b(".document-gallery[data-icon-width]")).each(function(){var a=b(this).data("icon-width");"undefined"!==typeof a&&b(this).find(".document-icon").width(a+"%")})}function m(){"undefined"!==typeof tinymce&&tinymce.PluginManager.add("dg",function(a,d){a.on("LoadContent dgUpdate undo",function(a){b(a.target.contentDocument).find(".wpview-type-dg > [data-shortcode]").each(function(){h(b.parseJSON(decodeURIComponent(b(this).data("shortcode"))),b(this))})})})}function n(){b("body").delegate(".dg-paginate-wrapper .paginate a",
2
  "click",function(a){var d=b(this).closest(".dg-paginate-wrapper"),e=d.data("shortcode");e.skip=0;var c=b(this).attr("href").split("#")[1].split("=");2<=c.length&&(e.skip=e.limit*(c.pop()-1));h(e,d);a.preventDefault()})}function k(){c=[];f=0;b(".document-gallery img[data-id]").each(function(){var a=b(this).data("id");-1===b.inArray(a,c)&&c.push(a)});l()}function h(a,d){"undefined"===typeof a.id&&(a.id=wp.media.dgDefaults.id);b.post(ajaxurl,{action:"dg_generate_gallery",atts:a},function(a){a=b(b.parseHTML(a));
3
  d.replaceWith(a);g(a);k()})}function l(){for(var a=[];f<c.length&&4!==a.length;f++)a.push(c[f]);0!=a.length&&b.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"dg_generate_icons",ids:a},success:p,error:function(a){console.error(a.responseText)}})}function p(a){for(var d in a)if(a.hasOwnProperty(d)){var c=b('.document-gallery img[data-id="'+d+'"]');c.removeAttr("data-id");(function(c,d){d.fadeOut("fast",function(){b(this).attr("src",a[c]);b(this).fadeIn("fast")})})(d,c)}l()}var c,f;b(document).ready(function(){g();
4
  k();m();n()})})(jQuery);
document-gallery.php CHANGED
@@ -5,14 +5,14 @@ defined( 'WPINC' ) OR exit;
5
  Plugin Name: Document Gallery
6
  Plugin URI: https://wordpress.org/plugins/document-gallery/
7
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
8
- Version: 4.2.3
9
  Author: Dan Rossiter
10
  Author URI: http://danrossiter.org/
11
  License: GPLv3
12
  Text Domain: document-gallery
13
  */
14
 
15
- define( 'DG_VERSION', '4.2.3' );
16
 
17
  if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
18
  add_action( 'admin_notices', 'dg_php_lt_three' );
5
  Plugin Name: Document Gallery
6
  Plugin URI: https://wordpress.org/plugins/document-gallery/
7
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
8
+ Version: 4.2.4
9
  Author: Dan Rossiter
10
  Author URI: http://danrossiter.org/
11
  License: GPLv3
12
  Text Domain: document-gallery
13
  */
14
 
15
+ define( 'DG_VERSION', '4.2.4' );
16
 
17
  if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
18
  add_action( 'admin_notices', 'dg_php_lt_three' );